about summary refs log tree commit diff
path: root/lib/util/mallocvar.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util/mallocvar.h')
-rw-r--r--lib/util/mallocvar.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util/mallocvar.h b/lib/util/mallocvar.h
index 31ad38bc..e92e3fe4 100644
--- a/lib/util/mallocvar.h
+++ b/lib/util/mallocvar.h
@@ -87,7 +87,7 @@ reallocProduct(void **      const blockP,
     void * array; \
     array = arrayName; \
     reallocProduct(&array, nElements, sizeof(arrayName[0])); \
-    if (!array) \
+    if (!array && arrayName) \
         free(arrayName); \
     arrayName = array; \
 } while (0)