fofi/FoFiTrueType.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit ceba74e5a372f3b48cffd30fa6d30a8ff3b13556 Author: Albert Astals Cid <[email protected]> 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 <[email protected]> // Copyright (C) 2007 Koji Otani <[email protected]> // Copyright (C) 2007 Carlos Garcia Campos <[email protected]> -// Copyright (C) 2008, 2009, 2012, 2014-2021 Albert Astals Cid <[email protected]> +// Copyright (C) 2008, 2009, 2012, 2014-2022 Albert Astals Cid <[email protected]> // Copyright (C) 2008 Tomas Are Haavet <[email protected]> // Copyright (C) 2012 Suzuki Toshiya <[email protected]> // Copyright (C) 2012, 2017 Adrian Johnson <[email protected]> @@ -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);
