Fix a segfault when parsing meta data in ogg.
authorRémi Duraffort <ivoire@videolan.org>
Sat, 27 Dec 2008 14:10:39 +0000 (15:10 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Sat, 27 Dec 2008 14:10:39 +0000 (15:10 +0100)
Thanks to Vincent Penquerc'h.

include/vlc_meta.h

index b5fc8c3..124b8ec 100644 (file)
@@ -135,11 +135,8 @@ static inline void vlc_meta_AddExtra( vlc_meta_t *m, const char *psz_name, const
 {
     char *psz_oldvalue = (char *)vlc_dictionary_value_for_key( &m->extra_tags, psz_name );
     if( psz_oldvalue != kVLCDictionaryNotFound )
-    {
-        free( psz_oldvalue );
         vlc_dictionary_remove_value_for_key( &m->extra_tags, psz_name,
                                              vlc_meta_FreeExtraKey, NULL );
-    }
     vlc_dictionary_insert( &m->extra_tags, psz_name, strdup(psz_value) );
 }