Contiki: Fix heapmem_free() warning

heapmem_free() warns if ptr is NULL.
This commit is contained in:
Jon Shallow committed 2026-06-07 15:58:28 +01:00
1 parent 97e74fbfe4
commit b55a3b7058
1 file changed
+2 -1
+2 -1
View File
@@ -654,7 +654,8 @@ coap_free_type(coap_memory_tag_t type, void *ptr) {
if (ptr)
track_counts[type]--;
#endif /* COAP_MEMORY_TYPE_TRACK */
heapmem_free(ptr);
if (ptr)
heapmem_free(ptr);
}
#endif /* WITH_CONTIKI */