Make kore_mem_free() behave like free() and don't do anything if NULL is passed in.

This commit is contained in:
Joris Vink 2014-09-25 22:20:47 +02:00
parent e3417dea16
commit 1c83af511d
1 changed files with 3 additions and 0 deletions

View File

@ -107,6 +107,9 @@ kore_mem_free(void *ptr)
u_int8_t *addr;
struct meminfo *mem;
if (ptr == NULL)
return;
mem = KORE_MEMINFO(ptr);
if (mem->magic != KORE_MEM_MAGIC)
fatal("kore_mem_free(): magic boundary not found");