From dc81c404b309b6d9fbe9ff30b87dc71685329585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20P=C3=B6tsch?= Date: Thu, 20 Sep 2012 16:52:09 +0200 Subject: [PATCH] fixed memory leak for async response in server.c --- examples/server.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/server.c b/examples/server.c index 7eca8847..f474e0a4 100644 --- a/examples/server.c +++ b/examples/server.c @@ -249,9 +249,8 @@ check_async(coap_context_t *ctx, coap_tick_t now) { if (coap_send(ctx, &async->peer, response) == COAP_INVALID_TID) { debug("check_async: cannot send response for message %d\n", response->hdr->id); - coap_delete_pdu(response); } - + coap_delete_pdu(response); coap_remove_async(ctx, async->id, &tmp); coap_free_async(async); async = NULL;