coap-server.c: Fix memory leak in hnd_put()

Added missing coap_delete_string() for uri_path in case of an error
return.

This fixes CID 1483553.
This commit is contained in:
Olaf Bergmann committed 2020-06-19 16:13:50 +02:00
1 parent da38169b42
commit ec3dfda228
1 file changed
+1
+1
View File
@@ -550,6 +550,7 @@ hnd_put(coap_context_t *ctx UNUSED_PARAM,
} else {
dynamic_count--;
response->code = COAP_RESPONSE_CODE(500);
coap_delete_string(uri_path);
return;
}
} else {