ref: b9e14e53a090337d08dea3d536325aa3daff1b38
parent: 00d4606c3baf813b7b1c176823b2729bf51002a2
author: Tor Andersson <tor.andersson@artifex.com>
date: Fri Apr 5 14:36:26 EDT 2019
Revert "Pacify valgrind: it doesn't know realloc(p, 0) is equivalent to free(p)." This reverts commit 86feee5b7b00b36758bb81ca3614daf61b99fc3c.
--- a/jsstate.c
+++ b/jsstate.c
@@ -9,10 +9,6 @@
static void *js_defaultalloc(void *actx, void *ptr, int size)
{
- if (size == 0) {
- free(ptr);
- return NULL;
- }
return realloc(ptr, (size_t)size);
}