fixed memory leak for async response in server.c

This commit is contained in:
Thomas Pötsch committed 2012-09-20 16:52:09 +02:00
1 parent fb657380c0
commit dc81c404b3
1 file changed
+1 -2
+1 -2
View File
@@ -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;