about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2024-04-11 20:55:38 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2024-04-11 20:55:38 +0000
commit08c5cac6ac42be4e409f82b209ba55e493d20107 (patch)
tree8fd813e9e29b493fdd77be3ef51e783c02785d6b /lib
parentb336d2147f09c60d43aefc15e6bffeaf2ba2d20e (diff)
downloadnetpbm-mirror-08c5cac6ac42be4e409f82b209ba55e493d20107.tar.gz
netpbm-mirror-08c5cac6ac42be4e409f82b209ba55e493d20107.tar.xz
netpbm-mirror-08c5cac6ac42be4e409f82b209ba55e493d20107.zip
Fix double free crash when memory allocation fails
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4905 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib')
-rw-r--r--lib/util/mallocvar.h2
1 files changed, 0 insertions, 2 deletions
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)