]> git.sesse.net Git - vlc/commitdiff
taglib writer: use decode_URI_duplicate
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 25 Jan 2010 16:31:26 +0000 (18:31 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 25 Jan 2010 16:32:02 +0000 (18:32 +0200)
The code looks suspicious though.

modules/meta_engine/taglib.cpp

index 59eda89fc34754685bbf1da10ae3303a30881658..1d230f372058f372083344ebd852a4e9fa31056a 100644 (file)
@@ -539,12 +539,9 @@ static int WriteMeta( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
-    char *export_file = strdup(p_export->psz_file);
-    if( decode_URI( export_file ) == NULL )
-    {
-        free( export_file );
+    char *export_file = decode_URI_duplicate(p_export->psz_file);
+    if( export_file == NULL )
         return VLC_EGENERIC;
-    }
 
 #if defined(WIN32) || defined (UNDER_CE)
     wchar_t wpath[MAX_PATH + 1];