From 675aa55968c5d740014a1083601dca6619ac01c2 Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Tue, 12 Dec 2006 10:26:26 +0200 Subject: [PATCH] Fix small memory leak. --- lily/open-type-font.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lily/open-type-font.cc b/lily/open-type-font.cc index 45ae95cce7..d34654e770 100644 --- a/lily/open-type-font.cc +++ b/lily/open-type-font.cc @@ -82,8 +82,10 @@ get_otf_table (FT_Face face, string tag) { FT_ULong len; FT_Byte *tab = load_table (tag.c_str (), face, &len); + string ret ((char const*) tab, len); + free (tab); - return string ((char const*) tab, len); + return ret; } FT_Face -- 2.39.5