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

New commits:
commit 7c7c35db46c0da51c09783a00484161721ea48ab
Author: Albert Astals Cid <[email protected]>
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 <[email protected]>
+// Copyright (C) 2005-2013, 2016 Albert Astals Cid <[email protected]>
 // Copyright (C) 2008 Kjartan Maraas <[email protected]>
 // Copyright (C) 2008 Boris Toloknov <[email protected]>
 // Copyright (C) 2008 Haruyuki Kawabe <[email protected]>
@@ -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);
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to