From 23a665fa9180a3daeb2a4ebe79d47a79a1a244db Mon Sep 17 00:00:00 2001 From: James Gray Date: Mon, 21 Sep 2015 16:09:03 -0500 Subject: [PATCH] plug leak in lime_font_get_family_name --- project/src/ExternalInterface.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/project/src/ExternalInterface.cpp b/project/src/ExternalInterface.cpp index 0996db619..b934dbd84 100644 --- a/project/src/ExternalInterface.cpp +++ b/project/src/ExternalInterface.cpp @@ -292,7 +292,10 @@ namespace lime { #ifdef LIME_FREETYPE Font *font = (Font*)(intptr_t)fontHandle; - return alloc_wstring (font->GetFamilyName ()); + wchar_t *name = font->GetFamilyName (); + value result = alloc_wstring (name); + delete name; + return result; #else return 0; #endif @@ -1377,4 +1380,4 @@ extern "C" int lime_register_prims () { return 0; -} \ No newline at end of file +}