From 68ae536657f58e9d0d316e85d4c0c83d534db6e9 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Mon, 2 Aug 2010 18:38:34 +0200 Subject: [PATCH] free resources --- subscribe.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/subscribe.c b/subscribe.c index 677b20bf..6ff24a65 100644 --- a/subscribe.c +++ b/subscribe.c @@ -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;