utils/JSInfo.cc |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit d30e66cf39ef69a81bdd91e21203c876f38d9a09
Author: Albert Astals Cid <[email protected]>
Date:   Mon Mar 6 22:43:27 2017 +0100

    pdfinfo: fix leak when printing JS

diff --git a/utils/JSInfo.cc b/utils/JSInfo.cc
index 71bfde9..0028239 100644
--- a/utils/JSInfo.cc
+++ b/utils/JSInfo.cc
@@ -5,7 +5,7 @@
 // This file is licensed under the GPLv2 or later
 //
 // Copyright (C) 2013 Adrian Johnson <[email protected]>
-// Copyright (C) 2016 Albert Astals Cid <[email protected]>
+// Copyright (C) 2016, 2017 Albert Astals Cid <[email protected]>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -111,7 +111,9 @@ void JSInfo::scan(int nPages) {
     if (print) {
       for (int i = 0; i < numNames; i++) {
        fprintf(file, "Name Dictionary \"%s\":\n", 
doc->getCatalog()->getJSName(i)->getCString());
-       printJS(doc->getCatalog()->getJS(i));
+       GooString *js = doc->getCatalog()->getJS(i);
+       printJS(js);
+       delete js;
        fputs("\n\n", file);
       }
     }
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to