[MPlayer-dev-eng] [PATCH] Fix a memory leak after call mp_input_get_cmd

Ulion ulion2002 at gmail.com
Sun Nov 4 07:19:59 CET 2007


Hello,

In mplayer.c, I found a memory leak in new gui code after call
mp_input_get_cmd didn't free the cmd.
Here's patch for it. I will commit it in two days or sooner with agreement.

-	if ( (cmd = mp_input_get_cmd(0,0,0)) != NULL) guiGetEvent(
guiIEvent,(char *)cmd->id );
+	if ( (cmd = mp_input_get_cmd(0,0,0)) != NULL) {
+	  guiGetEvent( guiIEvent,(char *)cmd->id );
+	  mp_cmd_free(cmd);
+	}


-- 
Ulion
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmd_mem_leak_fix.diff
Type: text/x-diff
Size: 571 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071104/75a99994/attachment.diff>


More information about the MPlayer-dev-eng mailing list