]> git.sesse.net Git - vlc/blobdiff - modules/stream_out/standard.c
Save a few useless strdup() calls
[vlc] / modules / stream_out / standard.c
index 975c9eace725225b08ec3d5abe4ae9312d0b4cc1..3645802d1f6b9c841edfcaa7be5fd253d7b8d1a6 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * standard.c: standard stream output module
  *****************************************************************************
- * Copyright (C) 2003-2004 VideoLAN
+ * Copyright (C) 2003-2004 the VideoLAN team
  * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
@@ -327,21 +327,18 @@ static int Open( vlc_object_t *p_this )
 
         var_Get( p_stream, SOUT_CFG_PREFIX "name", &val );
         if( *val.psz_string )
-        {
-            p_session->psz_name = strdup( val.psz_string );
-        }
+            p_session->psz_name = val.psz_string;
         else
         {
             p_session->psz_name = strdup( psz_url );
+            free( val.psz_string );
         }
-        free( val.psz_string );
 
         var_Get( p_stream, SOUT_CFG_PREFIX "group", &val );
         if( *val.psz_string )
-        {
-            p_session->psz_group = strdup( val.psz_string );
-        }
-        free( val.psz_string );
+            p_session->psz_group = val.psz_string;
+        else
+            free( val.psz_string );
 
         /* Now, parse the URL to extract host and port */
         vlc_UrlParse( &url, psz_url , 0);