mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-07 10:12:53 +03:00
Merge pull request #857 from kkrentz/net-pr
net.c: fix null pointer exception
This commit is contained in:
1 file changed
+5
@@ -2875,6 +2875,11 @@ handle_request(coap_context_t *context, coap_session_t *session, coap_pdu_t *pdu
|
||||
? COAP_MESSAGE_ACK
|
||||
: COAP_MESSAGE_NON,
|
||||
0, pdu->mid, coap_session_max_pdu_size(session));
|
||||
if (!response) {
|
||||
coap_log(LOG_ERR, "could not create response PDU\n");
|
||||
resp = 500;
|
||||
goto fail_response;
|
||||
}
|
||||
#ifndef WITHOUT_ASYNC
|
||||
/* If handling a separate response, need CON, not ACK response */
|
||||
if (async && pdu->type == COAP_MESSAGE_CON)
|
||||
|
||||
Reference in new issue
Block a user