about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/HISTORY2
-rw-r--r--lib/util/mallocvar.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/HISTORY b/doc/HISTORY
index ac70881d..89636a6c 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -6,6 +6,8 @@ CHANGE HISTORY
 
 not yet  BJH  Release 11.07.00
 
+              libnetpbm: Fix double free crash when memory allocation fails.
+
               libnetpbm: Allow color dictionary with more than 1000 entries.
 
               ppmhist, ppmtoxpm: Work with color dictionary with more than
diff --git a/lib/util/mallocvar.h b/lib/util/mallocvar.h
index 0b3794f4..73498357 100644
--- a/lib/util/mallocvar.h
+++ b/lib/util/mallocvar.h
@@ -120,8 +120,6 @@ reallocProduct(void **      const blockP,
     void * array; \
     array = arrayName; \
     reallocProduct(&array, nElements, sizeof(arrayName[0])); \
-    if (!array && arrayName) \
-        free(arrayName); \
     arrayName = array; \
 } while (0)