[poppler] fofi/FoFiTrueType.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 31 20:42:30 UTC 2022


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

New commits:
commit ceba74e5a372f3b48cffd30fa6d30a8ff3b13556
Author: Albert Astals Cid <aacid at kde.org>
Date:   Mon Jan 31 21:34:02 2022 +0100

    Fix leak introduced in 953c9c762f346236d856327833f3a550b993138a

diff --git a/fofi/FoFiTrueType.cc b/fofi/FoFiTrueType.cc
index d1ab233f..dca1be0b 100644
--- a/fofi/FoFiTrueType.cc
+++ b/fofi/FoFiTrueType.cc
@@ -16,7 +16,7 @@
 // Copyright (C) 2006 Takashi Iwai <tiwai at suse.de>
 // Copyright (C) 2007 Koji Otani <sho at bbr.jp>
 // Copyright (C) 2007 Carlos Garcia Campos <carlosgc at gnome.org>
-// Copyright (C) 2008, 2009, 2012, 2014-2021 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2008, 2009, 2012, 2014-2022 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2008 Tomas Are Haavet <tomasare at gmail.com>
 // Copyright (C) 2012 Suzuki Toshiya <mpsuzuki at hiroshima-u.ac.jp>
 // Copyright (C) 2012, 2017 Adrian Johnson <ajohnson at redneon.com>
@@ -472,6 +472,7 @@ std::unique_ptr<FoFiTrueType> FoFiTrueType::load(const char *fileName, int faceI
     // Cannot use std::make_unique, because the constructor is private
     auto ff = new FoFiTrueType(fileA, lenA, true, faceIndexA);
     if (!ff->parsedOk) {
+        delete ff;
         return nullptr;
     }
     return std::unique_ptr<FoFiTrueType>(ff);


More information about the poppler mailing list