[poppler] Branch 'poppler-0.14' - goo/gmem.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Wed Oct 27 16:41:22 PDT 2010
goo/gmem.cc | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit c7696a2604fd77bf0c1b2d31b75d2f97ab8e8b61
Author: Albert Astals Cid <aacid at kde.org>
Date: Thu Oct 28 00:37:29 2010 +0100
if reallocn fails, free p
diff --git a/goo/gmem.cc b/goo/gmem.cc
index af3e19e..453fce5 100644
--- a/goo/gmem.cc
+++ b/goo/gmem.cc
@@ -253,8 +253,12 @@ inline static void *greallocn(void *p, int nObjs, int objSize, bool checkoverflo
throw GMemException();
#else
fprintf(stderr, "Bogus memory allocation size\n");
- if (checkoverflow) return NULL;
- else exit(1);
+ if (checkoverflow) {
+ gfree(p);
+ return NULL;
+ } else {
+ exit(1);
+ }
#endif
}
return grealloc(p, n, checkoverflow);
More information about the poppler
mailing list