diff libvo/font_load_ft.c @ 13632:b633ce0aa5c5

fixed small memleaks
author reimar
date Wed, 13 Oct 2004 16:22:59 +0000
parents 7821a35b5dcc
children e047e70a9767
line wrap: on
line diff
--- a/libvo/font_load_ft.c	Wed Oct 13 09:58:50 2004 +0000
+++ b/libvo/font_load_ft.c	Wed Oct 13 16:22:59 2004 +0000
@@ -882,10 +882,12 @@
 	if (desc->pic_a[i]) {
 	    if (desc->pic_a[i]->bmp) free(desc->pic_a[i]->bmp);
 	    if (desc->pic_a[i]->pal) free(desc->pic_a[i]->pal);
+	    free (desc->pic_a[i]);
 	}
 	if (desc->pic_b[i]) {
 	    if (desc->pic_b[i]->bmp) free(desc->pic_b[i]->bmp);
 	    if (desc->pic_b[i]->pal) free(desc->pic_b[i]->pal);
+	    free (desc->pic_b[i]);
 	}
     }
 
@@ -909,7 +911,9 @@
     if (name) err = FT_New_Face(library, name, 0, face);
 
     if (err) {
-	err = FT_New_Face(library, get_path("subfont.ttf"), 0, face);
+	char *font_file = get_path("subfont.ttf");
+	err = FT_New_Face(library, font_file, 0, face);
+	free(font_file);
 	if (err) {
 	    err = FT_New_Face(library, MPLAYER_DATADIR "/subfont.ttf", 0, face);
 	    if (err) {