]> git.sesse.net Git - vlc/commitdiff
Fix a (really) small memleak (even if i_count is 0, some memory is allocated
authorRémi Duraffort <ivoire@videolan.org>
Wed, 20 May 2009 11:00:52 +0000 (13:00 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Wed, 20 May 2009 11:06:21 +0000 (13:06 +0200)
for the strucure).

src/control/media_player.c

index 98ca4b38ba1065ddecd785b4f0e554ec1980567e..fe80925d68e084b445578c7f75409183766cc905 100644 (file)
@@ -1241,7 +1241,10 @@ libvlc_track_description_t *
     var_Change( p_input, psz_variable, VLC_VAR_GETLIST, &val_list, &text_list);
 
     if( val_list.p_list->i_count <= 0 ) /* no tracks */
+    {
+        var_Change( p_input, psz_variable, VLC_VAR_FREELIST, &val_list, &text_list);
         return NULL;
+    }
 
     libvlc_track_description_t *p_track_description, *p_actual, *p_previous;
     p_track_description = ( libvlc_track_description_t * )