From b1f1d02ceb2417577b2781379d68a16b97003ffe Mon Sep 17 00:00:00 2001 From: ulion Date: Tue, 6 Nov 2007 03:41:15 +0000 Subject: [PATCH] Fix memory leak caused by after calling mp_input_get_cmd didn't free the cmd. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24975 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mplayer.c b/mplayer.c index 0c741c8d07..9c0c925db6 100644 --- a/mplayer.c +++ b/mplayer.c @@ -2699,7 +2699,10 @@ if(!noconsolecontrols && !slave_mode){ 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 )