plug leak in lime_font_get_family_name

This commit is contained in:
James Gray
2015-09-21 16:09:03 -05:00
parent 59ae4ef454
commit 23a665fa91

View File

@@ -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