[vlc-commits] playlist: fetcher: fix memory leaks

Hannes Domani git at videolan.org
Wed Sep 10 06:03:07 CEST 2014


vlc | branch: master | Hannes Domani <ssbssa at yahoo.de> | Wed Sep  3 19:52:28 2014 +0200| [a868b9e580a2ec98ec4a13ba5a2cf463821af337] | committer: Tristan Matthews

playlist: fetcher: fix memory leaks

Signed-off-by: Tristan Matthews <le.businessman at gmail.com>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a868b9e580a2ec98ec4a13ba5a2cf463821af337
---

 src/playlist/fetcher.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/playlist/fetcher.c b/src/playlist/fetcher.c
index eb86994..41e0c32 100644
--- a/src/playlist/fetcher.c
+++ b/src/playlist/fetcher.c
@@ -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 );



More information about the vlc-commits mailing list