changeset 14627:cd16b26cf6e0

Yet another memleak...
author reimar
date Mon, 31 Jan 2005 18:16:39 +0000
parents 13ffc5167c2d
children b063d8421fcc
files Gui/interface.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/interface.c	Mon Jan 31 17:59:36 2005 +0000
+++ b/Gui/interface.c	Mon Jan 31 18:16:39 2005 +0000
@@ -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