lwip: Fix minor issues

Increase MEMP_LEN_COAPSTRING to handle example server .wellknown/core request.

If session cannot be generated, check for NULL pointer.
This commit is contained in:
Jon Shallow authored and mrdeep1 committed 2022-06-21 10:26:40 +01:00
1 parent 6046dcbd55
commit fe51d3335e
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@
#endif
#ifndef MEMP_LEN_COAPSTRING
#define MEMP_LEN_COAPSTRING 32
#define MEMP_LEN_COAPSTRING 40
#endif
#ifndef MEMP_NUM_COAPCACHE_KEYS
+2 -1
View File
@@ -110,7 +110,8 @@ error:
* https://tools.ietf.org/html/rfc7252#section-4.2 MUST send RST
* https://tools.ietf.org/html/rfc7252#section-4.3 MAY send RST
*/
coap_send_rst(session, pdu);
if (session)
coap_send_rst(session, pdu);
coap_delete_pdu(pdu);
if (packet) {
packet->pbuf = NULL;