mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-05 20:02:19 +03:00
free resources
This commit is contained in:
1 parent
32d95f3c9d
commit
68ae536657
1 file changed
+4
-6
+4
-6
@@ -20,8 +20,8 @@ notify(coap_context_t *context, coap_resource_t *res,
|
||||
coap_subscription_t *sub, unsigned int duration, int code) {
|
||||
coap_pdu_t *pdu;
|
||||
int ls, finished=0;
|
||||
unsigned char ct;
|
||||
unsigned int d, length;
|
||||
unsigned char ct, d;
|
||||
unsigned int length;
|
||||
#ifndef NDEBUG
|
||||
char addr[INET6_ADDRSTRLEN];
|
||||
#endif
|
||||
@@ -237,13 +237,11 @@ coap_delete_resource(coap_context_t *context, coap_key_t key) {
|
||||
debug("removed key %u (%s)\n",key,COAP_RESOURCE(node)->uri->path.s);
|
||||
if (!prev) {
|
||||
context->resources = node->next;
|
||||
/* FIXME: must free? -> current version triggers SIGSEGV */
|
||||
/* coap_free_resource(node); */
|
||||
coap_free_resource(node);
|
||||
coap_delete(node);
|
||||
} else {
|
||||
prev->next = node->next;
|
||||
/* FIXME: must free? -> current version triggers SIGSEGV */
|
||||
/* coap_free_resource(node); */
|
||||
coap_free_resource(node);
|
||||
coap_delete(node);
|
||||
}
|
||||
return 1;
|
||||
|
||||
Reference in new issue
Block a user