]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix small memory leak.
authorJoe Neeman <joeneeman@gmail.com>
Tue, 12 Dec 2006 08:26:26 +0000 (10:26 +0200)
committerJoe Neeman <joeneeman@gmail.com>
Tue, 12 Dec 2006 08:26:26 +0000 (10:26 +0200)
lily/open-type-font.cc

index 45ae95cce76ea7ad80bf2456d8210b0fcb05c643..d34654e77045eb698f96dcaedf967ac204742502 100644 (file)
@@ -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