mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-12 11:40:39 +03:00
Contiki: Fix heapmem_free() warning
heapmem_free() warns if ptr is NULL.
This commit is contained in:
1 parent
4803f161f0
commit
c72a7b32a1
1 file changed
+2
-1
+2
-1
@@ -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 */
|
||||
|
||||
Reference in new issue
Block a user