Revert "Pacify valgrind: it doesn't know realloc(p, 0) is equivalent to free(p)."

This reverts commit 86feee5b7b.
This commit is contained in:
Tor Andersson
2019-04-05 18:36:26 +02:00
parent 00d4606c3b
commit b9e14e53a0

View File

@@ -9,10 +9,6 @@
static void *js_defaultalloc(void *actx, void *ptr, int size) static void *js_defaultalloc(void *actx, void *ptr, int size)
{ {
if (size == 0) {
free(ptr);
return NULL;
}
return realloc(ptr, (size_t)size); return realloc(ptr, (size_t)size);
} }