]> git.sesse.net Git - vlc/commitdiff
playlist: fetcher: fix memory leaks
authorHannes Domani <ssbssa@yahoo.de>
Wed, 3 Sep 2014 17:52:28 +0000 (19:52 +0200)
committerTristan Matthews <le.businessman@gmail.com>
Wed, 10 Sep 2014 04:00:06 +0000 (00:00 -0400)
Signed-off-by: Tristan Matthews <le.businessman@gmail.com>
src/playlist/fetcher.c

index eb86994933bc0223232058a6eb42bd7856bade19..41e0c32ed08d1323792b5ee9371868c1daa52ad8 100644 (file)
@@ -227,15 +227,15 @@ static int FindArt( playlist_fetcher_t *p_fetcher, input_item_t *p_item )
                 msg_Dbg( p_fetcher->object,
                          " will search at higher scope, if possible" );
                 p_album = &p_fetcher->albums.p_elems[fe_idx];
+
+                psz_artist = psz_album = NULL;
                 break;
             }
         FOREACH_END();
     }
-    else
-    {
-        free( psz_artist );
-        free( psz_album );
-    }
+
+    free( psz_artist );
+    free( psz_album );
 
     if ( playlist_FindArtInCacheUsingItemUID( p_item ) != VLC_SUCCESS )
         playlist_FindArtInCache( p_item );