From ebc693fec0777b12da22e4294c1cde4e6a3ba864 Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Sat, 10 Feb 2024 16:21:54 +0000 Subject: [PATCH] coap-server.c: Fix CID 1583550 --- examples/coap-server.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/coap-server.c b/examples/coap-server.c index 103d3b5a..9ad2a033 100644 --- a/examples/coap-server.c +++ b/examples/coap-server.c @@ -1390,11 +1390,7 @@ hnd_put_post(coap_resource_t *resource, COAP_CACHE_NOT_RECORD_PDU, COAP_CACHE_IS_SESSION_BASED, 0); } else { - data_so_far = coap_cache_get_app_data(cache_entry); - if (data_so_far) { - coap_delete_binary(data_so_far); - data_so_far = NULL; - } + coap_delete_binary(coap_cache_get_app_data(cache_entry)); coap_cache_set_app_data(cache_entry, NULL, NULL); } }