Free memory when 0-size is defined for realloc

This commit is contained in:
Mamadou DIOP 2015-12-02 03:26:04 +01:00
parent 0e56b468ee
commit 17900e49f6
1 changed files with 3 additions and 0 deletions

View File

@ -86,6 +86,9 @@ void* tsk_realloc (void* ptr, tsk_size_t size)
}
}
}
else if (ptr) {
free(ptr);
}
return ret;
}