]> git.sesse.net Git - vlc/blobdiff - src/modules/os.c
Removing historical comment
[vlc] / src / modules / os.c
index 28862a2cf865541450232e166c6f3ca98d18432a..63df567bf1075a2cfc9acb1327cda46bb5906e64 100644 (file)
@@ -188,12 +188,13 @@ int module_Load( vlc_object_t *p_this, const char *psz_file,
     char *path = ToLocale( psz_file );
 
     handle = dlopen( path, flags );
-    LocaleFree( path );
     if( handle == NULL )
     {
         msg_Warn( p_this, "cannot load module `%s' (%s)", path, dlerror() );
+        LocaleFree( path );
         return -1;
     }
+    LocaleFree( path );
 
 #elif defined(HAVE_DL_SHL_LOAD)
     handle = shl_load( psz_file, BIND_IMMEDIATE | BIND_NONFATAL, NULL );