[MPlayer-dev-eng] [PATCH] Fix a memleak in libmenu/menu_dvbsel.c

Andrew Calkin andrew.calkin at gmail.com
Wed Dec 12 06:24:41 CET 2007


Patch does $subj. In read_cmd(), cmd_name may be malloc'd,
but is never free'd.

//Andrew 
-------------- next part --------------
--- MPlayer/libmenu/menu_dvbin.c	2007-08-28 11:31:51.000000000 +0800
+++ MPlayer/libmenu/menu_dvbin.c	2007-12-12 14:11:45.000000000 +0900
@@ -213,6 +213,7 @@
 				sprintf(cmd_name, "loadfile 'dvb://%d@%s'", mpriv->card+1, elem->p.txt);
 		
 		c = mp_input_parse_cmd(cmd_name);
+		free(cmd_name);
     	if(c)
           {
             if (mpriv->auto_close)


More information about the MPlayer-dev-eng mailing list