mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-08 10:32:53 +03:00
coap-server.c: Fix memory leak in hnd_put()
hnd_put() creates a new string object for the request's URI path. When the permittwed number of dynamic resources was exceeded, this object must be released manually. This fixed CID 1483553 reported by Coverity scan.
This commit is contained in:
1 parent
b79a43de30
commit
3ec6dffbf1
1 file changed
+1
@@ -440,6 +440,7 @@ hnd_put(coap_context_t *ctx UNUSED_PARAM,
|
||||
if (dynamic_count >= support_dynamic) {
|
||||
/* Should have been caught in hnd_unknown_put() */
|
||||
response->code = COAP_RESPONSE_CODE(406);
|
||||
coap_delete_string(uri_path);
|
||||
return;
|
||||
}
|
||||
dynamic_count++;
|
||||
|
||||
Reference in new issue
Block a user