]> git.sesse.net Git - vlc/blobdiff - src/modules/modules.c
Don't leak every https parameters.
[vlc] / src / modules / modules.c
index eeabe10ef65e768cfc7204de7a85baba9362ce7c..9ff601b3a6aa5916a564b14758292fdc99d412df 100644 (file)
@@ -371,11 +371,7 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
     /* Deal with variables */
     if( psz_name && psz_name[0] == '$' )
     {
-        vlc_value_t val;
-        var_Create( p_this, psz_name + 1, VLC_VAR_MODULE | VLC_VAR_DOINHERIT );
-        var_Get( p_this, psz_name + 1, &val );
-        psz_var = val.psz_string;
-        psz_name = psz_var;
+        psz_name = psz_var = var_CreateGetString( p_this, psz_name + 1 );
     }
 
     /* Count how many different shortcuts were asked for */
@@ -874,14 +870,21 @@ static char * copy_next_paths_token( char * paths, char ** remaining_paths )
     if( !path ) return NULL;
 
     /* Look for PATH_SEP_CHAR (a ':' or a ';') */
-    for( i = 0, done = 0 ; paths[i]; i++ ) {
+    for( i = 0, done = 0 ; paths[i]; i++ )
+    {
         /* Take care of \\ and \: or \; escapement */
-        if( escaped ) {
+        if( escaped )
+        {
             escaped = false;
             path[done++] = paths[i];
         }
+#ifdef WIN32
+        else if( paths[i] == '/' )
+            escaped = true;
+#else
         else if( paths[i] == '\\' )
             escaped = true;
+#endif
         else if( paths[i] == PATH_SEP_CHAR )
             break;
         else
@@ -1213,6 +1216,7 @@ static int AllocatePluginFile( vlc_object_t * p_this, char * psz_file,
         p_bank->pp_cache[p_bank->i_cache]->b_used = true;
         p_bank->pp_cache[p_bank->i_cache]->p_module = p_module;
         p_bank->i_cache++;
+#undef p_bank
     }
 
     return p_module ? 0 : -1;
@@ -1238,7 +1242,6 @@ static module_t * AllocatePlugin( vlc_object_t * p_this, char * psz_file )
     p_module = vlc_module_create( p_this );
     if( p_module == NULL )
     {
-        msg_Err( p_this, "out of memory" );
         module_Unload( handle );
         return NULL;
     }
@@ -1342,10 +1345,7 @@ static int AllocateBuiltinModule( vlc_object_t * p_this,
      * allocate a structure for it */
     p_module = vlc_module_create( p_this );
     if( p_module == NULL )
-    {
-        msg_Err( p_this, "out of memory" );
         return -1;
-    }
 
     /* Initialize the module : fill p_module->psz_object_name, etc. */
     if( pf_entry( p_module ) != 0 )