[Mplayer-cvslog] CVS: main/libmpdemux demux_real.c,1.61,1.62

Roberto Togni CVS syncmail at mplayerhq.hu
Mon Nov 1 14:49:10 CET 2004


CVS change done by Roberto Togni CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv19564

Modified Files:
	demux_real.c 
Log Message:
Memleak fix: free index data at demuxer_close
Patch by Wei Jiang ( jiangw98 at yahoo dot com )


Index: demux_real.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_real.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- demux_real.c	10 Aug 2004 20:13:44 -0000	1.61
+++ demux_real.c	1 Nov 2004 13:49:07 -0000	1.62
@@ -1516,10 +1516,15 @@
 
 void demux_close_real(demuxer_t *demuxer)
 {
+    int i;
     real_priv_t* priv = demuxer->priv;
  
-    if (priv)
+    if (priv){
+    	for(i=0; i<MAX_STREAMS; i++)
+	    if(priv->index_table[i])
+	        free(priv->index_table[i]);
 	free(priv);
+    }
 
     return;
 }




More information about the MPlayer-cvslog mailing list