summaryrefslogtreecommitdiff
path: root/src/libtiff/tif_aux.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtiff/tif_aux.c')
-rw-r--r--src/libtiff/tif_aux.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/libtiff/tif_aux.c b/src/libtiff/tif_aux.c
index 7500295..2012f19 100644
--- a/src/libtiff/tif_aux.c
+++ b/src/libtiff/tif_aux.c
@@ -1,4 +1,4 @@
-/* $Id: tif_aux.c,v 1.3 2009/12/11 15:17:41 scuri Exp $ */
+/* $Id: tif_aux.c,v 1.4 2010/01/26 15:56:36 scuri Exp $ */
/*
* Copyright (c) 1991-1997 Sam Leffler
@@ -34,8 +34,7 @@
#include <math.h>
tdata_t
-_TIFFCheckRealloc(TIFF* tif, tdata_t buffer,
- size_t nmemb, size_t elem_size, const char* what)
+_TIFFCheckMalloc(TIFF* tif, size_t nmemb, size_t elem_size, const char* what)
{
tdata_t cp = NULL;
tsize_t bytes = nmemb * elem_size;
@@ -44,19 +43,12 @@ _TIFFCheckRealloc(TIFF* tif, tdata_t buffer,
* XXX: Check for integer overflow.
*/
if (nmemb && elem_size && bytes / elem_size == nmemb)
- cp = _TIFFrealloc(buffer, bytes);
+ cp = _TIFFmalloc(bytes);
if (cp == NULL)
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "No space %s", what);
-
- return cp;
-}
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name, "No space %s", what);
-tdata_t
-_TIFFCheckMalloc(TIFF* tif, size_t nmemb, size_t elem_size, const char* what)
-{
- return _TIFFCheckRealloc(tif, NULL, nmemb, elem_size, what);
+ return (cp);
}
static int