[poppler] utils/HtmlOutputDev.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sun Sep 4 13:43:36 UTC 2016


 utils/HtmlOutputDev.cc |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 7c7c35db46c0da51c09783a00484161721ea48ab
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Sep 4 15:40:32 2016 +0200

    Fix memory leak in error handling

diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 4f51fe6..a084ba0 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -17,7 +17,7 @@
 // All changes made under the Poppler project to this file are licensed
 // under GPL version 2 or later
 //
-// Copyright (C) 2005-2013 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2005-2013, 2016 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2008 Kjartan Maraas <kmaraas at gnome.org>
 // Copyright (C) 2008 Boris Toloknov <tlknv at yandex.ru>
 // Copyright (C) 2008 Haruyuki Kawabe <Haruyuki.Kawabe at unisys.co.jp>
@@ -1395,6 +1395,8 @@ void HtmlOutputDev::drawPngImage(GfxState *state, Stream *str, int width, int he
       p = imgStr->getLine();
       if (!p) {
         error(errIO, -1, "Failed to read PNG. '{0:t}' will be incorrect", fName);
+        delete fName;
+        gfree(row);
         delete writer;
         delete imgStr;
         fclose(f1);


More information about the poppler mailing list