[MPlayer-dev-eng] [PATCH] fix a memleak on sub_font, it was never freed

Benjamin Zores ben at geexbox.org
Thu Jan 3 19:46:24 CET 2008


Guillaume LECERF a écrit :
> Hi again,
> 
> Happy New Year to everyone.
> 
> 2007/12/27, Ulion <ulion2002 at gmail.com>:
>> Looks correct, but you missed another place in mplayer.c assign
>> sub_font by vo_font.
> 
> Here is the updated patch, and I followed you advice and removed the
> free from load_font_ft and placed it before every call.
> 

  	if (sub_font_name)
  	    load_font_ft(dxs, dys, &sub_font, sub_font_name);
  	else
-	    sub_font = vo_font;
+	    load_font_ft(dxs, dys, &sub_font, font_name);


=> load_font_ft(dxs, dyx, &sub_font, sub_font_name ? sub_font_name : 
font_name);

Same in the 2nd occurence below.

Ben




More information about the MPlayer-dev-eng mailing list