[Mplayer-cvslog] CVS: main/libvo font_load_ft.c,1.13,1.14

Reimar Döffinger CVS syncmail at mplayerhq.hu
Wed Oct 13 18:23:02 CEST 2004


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv22191/libvo

Modified Files:
	font_load_ft.c 
Log Message:
fixed small memleaks


Index: font_load_ft.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/font_load_ft.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- font_load_ft.c	8 Dec 2003 13:30:30 -0000	1.13
+++ font_load_ft.c	13 Oct 2004 16:22:59 -0000	1.14
@@ -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) {




More information about the MPlayer-cvslog mailing list