block.c: Fix data leak in coap_add_data_large_internal

This commit is contained in:
Jon Shallow committed 2022-04-07 09:42:27 +01:00
1 parent eb7656850f
commit d57d44aa14
1 file changed
+2
+2
View File
@@ -351,6 +351,8 @@ coap_add_data_large_internal(coap_session_t *session,
assert(pdu);
if (pdu->data) {
coap_log(LOG_WARNING, "coap_add_data_large: PDU already contains data\n");
if (release_func)
release_func(session, app_ptr);
return 0;
}