Skip to content

Commit

Permalink
Merge pull request #536 from mrdeep1/bad_tcp
Browse files Browse the repository at this point in the history
net.c: memory leak in handle_request if error input
  • Loading branch information
obgm committed Aug 12, 2020
2 parents 1b63deb + b3eacf2 commit 1739507
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -2363,10 +2363,11 @@ handle_request(coap_context_t *context, coap_session_t *session, coap_pdu_t *pdu
} else {
coap_delete_pdu(response);
}
response = NULL;
} else {
coap_log(LOG_WARNING, "cannot generate response\r\n");
coap_delete_pdu(response);
}
response = NULL;
} else {
if (coap_string_equal(uri_path, &coap_default_uri_wellknown)) {
/* request for .well-known/core */
Expand Down

0 comments on commit 1739507

Please sign in to comment.