poppler/Form.cc |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit db171f489ca532e48a1c44e2e3dfb9c069754582
Author: Albert Astals Cid <[email protected]>
Date:   Sat Jan 2 23:03:29 2021 +0100

    Fix memory leak if saving the file fails

diff --git a/poppler/Form.cc b/poppler/Form.cc
index f75e42f6..2eedbebc 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -5,7 +5,7 @@
 // This file is licensed under the GPLv2 or later
 //
 // Copyright 2006-2008 Julien Rebetez <[email protected]>
-// Copyright 2007-2012, 2015-2020 Albert Astals Cid <[email protected]>
+// Copyright 2007-2012, 2015-2021 Albert Astals Cid <[email protected]>
 // Copyright 2007-2008, 2011 Carlos Garcia Campos <[email protected]>
 // Copyright 2007, 2013, 2016, 2019 Adrian Johnson <[email protected]>
 // Copyright 2007 Iñigo Martínez <[email protected]>
@@ -549,6 +549,7 @@ bool FormWidgetSignature::signDocument(const char 
*saveFilename, const char *cer
     GooString *fname = new GooString(saveFilename);
     if (doc->saveAs(fname, writeForceIncremental) != errNone) {
         fprintf(stderr, "signDocument: error saving to file \"%s\"\n", 
saveFilename);
+        delete fname;
         return false;
     }
 
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to