From 94b107fca019a1c3f5a24619c4ebd104951ce6ef Mon Sep 17 00:00:00 2001 From: Alfred Kayser Date: Wed, 21 Oct 2009 11:58:49 +0200 Subject: [PATCH] [Bug 523065] libjar: use malloc instead of calloc for zlib. r=tglek --- modules/libjar/nsZipArchive.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/libjar/nsZipArchive.cpp b/modules/libjar/nsZipArchive.cpp index 684129a2895..57ffc85c8df 100644 --- a/modules/libjar/nsZipArchive.cpp +++ b/modules/libjar/nsZipArchive.cpp @@ -124,10 +124,10 @@ static void * zlibAlloc(void *opaque, uInt items, uInt size) { nsRecyclingAllocator *zallocator = (nsRecyclingAllocator *)opaque; - if (gZlibAllocator) { - return gZlibAllocator->Calloc(items, size); + if (zallocator) { + return gZlibAllocator->Malloc(items * size); } - return calloc(items, size); + return malloc(items * size); } static void