changeset 24947:7667b611e6b4

Fix memory leak caused by after calling mp_input_get_cmd didn't free the cmd.
author ulion
date Tue, 06 Nov 2007 03:41:15 +0000
parents 259a3df86fbc
children 88f94ec441d1
files mplayer.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Mon Nov 05 20:16:06 2007 +0000
+++ b/mplayer.c	Tue Nov 06 03:41:15 2007 +0000
@@ -2699,7 +2699,10 @@
 	usec_sleep(20000);
 	guiEventHandling();
 	guiGetEvent( guiReDraw,NULL );
-	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);
+	}
        } 
       guiGetEvent( guiSetParameters,NULL );
       if ( guiIntfStruct.StreamType == STREAMTYPE_STREAM )