about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-10-13 17:09:51 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-10-13 17:09:51 +0000
commitbebac2d97fef5d22569ad90df01c9f9f3d25b1f5 (patch)
tree84b366c315e7d015ac2cf35d1412246063acce2a
parent24c3f43ad38abb1d860edd25838a5b56825fb6dc (diff)
downloadnetpbm-mirror-bebac2d97fef5d22569ad90df01c9f9f3d25b1f5.tar.gz
netpbm-mirror-bebac2d97fef5d22569ad90df01c9f9f3d25b1f5.tar.xz
netpbm-mirror-bebac2d97fef5d22569ad90df01c9f9f3d25b1f5.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4755 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--lib/libpam.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libpam.c b/lib/libpam.c
index 206e850f..9875331d 100644
--- a/lib/libpam.c
+++ b/lib/libpam.c
@@ -142,7 +142,7 @@ pnm_allocpamtuple(const struct pam * const pamP) {
 
     tuple retval;
 
-    retval = malloc(allocationDepth(pamP) * sizeof(retval[0]));
+    MALLOCARRAY(retval, allocationDepth(pamP));
 
     if (retval == NULL)
         pm_error("Out of memory allocating %u-plane tuple",
@@ -322,7 +322,7 @@ pnm_allocrowimage(const struct pam * const pamP) {
 
     unsigned char * retval;
 
-    retval = malloc(size);
+    MALLOCARRAY(retval, size);
 
     if (retval == NULL)
         pm_error("Unable to allocate %u bytes for a row image buffer",