[poppler] poppler/SplashOutputDev.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Mon Mar 6 21:25:45 UTC 2017
poppler/SplashOutputDev.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 8ebec831c2abea9f13761474990c0d94346c1a35
Author: Albert Astals Cid <aacid at kde.org>
Date: Mon Mar 6 22:24:06 2017 +0100
SplashOutputDev: Fix memory leak when rendering images with colormap and matte color
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 093baa9..3caa6d1 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -15,7 +15,7 @@
//
// Copyright (C) 2005 Takashi Iwai <tiwai at suse.de>
// Copyright (C) 2006 Stefan Schweizer <genstef at gentoo.org>
-// Copyright (C) 2006-2016 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2006-2017 Albert Astals Cid <aacid at kde.org>
// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk at gmail.com>
// Copyright (C) 2006 Scott Turner <scotty1024 at mac.com>
// Copyright (C) 2007 Koji Otani <sho at bbr.jp>
@@ -4020,9 +4020,9 @@ void SplashOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref,
maskStr->reset();
maskStr->doGetChars(maskWidth * maskHeight, data);
maskStr->close();
- Object *maskDict = new Object();
- maskDict->initDict(maskStr->getDict());
- maskStr = new MemStream((char *)data, 0, maskWidth * maskHeight, maskDict);
+ Object maskDict;
+ maskDict.initDict(maskStr->getDict());
+ maskStr = new MemStream((char *)data, 0, maskWidth * maskHeight, &maskDict);
((MemStream *) maskStr)->setNeedFree(gTrue);
}
imgMaskData.imgStr = new ImageStream(maskStr, maskWidth,
More information about the poppler
mailing list