summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2017-03-06 22:24:06 +0100
committerAlbert Astals Cid <aacid@kde.org>2017-03-06 22:25:39 +0100
commit8ebec831c2abea9f13761474990c0d94346c1a35 (patch)
tree9dda1e98ad32a9e0beb03c48a4f518798cfeb15c
parentcfaeeadbc642a297486481d9efd6068fd9ef7ea3 (diff)
SplashOutputDev: Fix memory leak when rendering images with colormap and matte color
-rw-r--r--poppler/SplashOutputDev.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 093baa94..3caa6d16 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -15,7 +15,7 @@
//
// Copyright (C) 2005 Takashi Iwai <tiwai@suse.de>
// Copyright (C) 2006 Stefan Schweizer <genstef@gentoo.org>
-// Copyright (C) 2006-2016 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006-2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
// Copyright (C) 2006 Scott Turner <scotty1024@mac.com>
// Copyright (C) 2007 Koji Otani <sho@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,