[MPlayer-cvslog] CVS: main/Gui interface.c,1.102,1.103

Reimar Döffinger CVS syncmail at mplayerhq.hu
Mon Jan 31 19:16:42 CET 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/Gui
In directory mail:/var2/tmp/cvs-serv8765

Modified Files:
	interface.c 
Log Message:
Yet another memleak...


Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -r1.102 -r1.103
--- interface.c	6 Jan 2005 18:10:36 -0000	1.102
+++ interface.c	31 Jan 2005 18:16:39 -0000	1.103
@@ -842,8 +842,9 @@
 	  tmp = calloc( 1,strlen( gtkAOOSSDevice ) + 7 );
 	  sprintf( tmp,"oss:%s",gtkAOOSSDevice );
 	  } else
-	    tmp = "oss";
+	    tmp = strdup("oss");
 	  gaddlist( &audio_driver_list,tmp );
+	  free(tmp);
 	 }
 #endif
 #if defined(HAVE_ALSA9) || defined (HAVE_ALSA1X)
@@ -856,8 +857,9 @@
 	    tmp = calloc( 1,strlen( gtkAOALSADevice ) + 14 );
 	    sprintf( tmp,"alsa:device=%s",gtkAOALSADevice );
 	  } else
-	    tmp = "alsa";
+	    tmp = strdup("alsa");
 	  gaddlist( &audio_driver_list,tmp );
+	  free(tmp);
 	 }
 #endif
 #ifdef HAVE_SDL
@@ -868,8 +870,9 @@
 	  tmp = calloc( 1,strlen( gtkAOSDLDriver ) + 10 );
 	  sprintf( tmp,"sdl:%s",gtkAOSDLDriver );
 	  } else
-	    tmp = "sdl";
+	    tmp = strdup("sdl");
 	  gaddlist( &audio_driver_list,tmp );
+	  free(tmp);
 	 }
 #endif
 // -- subtitle




More information about the MPlayer-cvslog mailing list