[vlc-commits] playlist: Fetcher: Fix leak

Hugo Beauzée-Luyssen git at videolan.org
Wed Oct 21 19:19:55 CEST 2015


vlc/vlc-2.2 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Oct 20 17:01:39 2015 +0200| [5c57ebeea44a31c8a5ae648dc004787b4d0c4fd1] | committer: Jean-Baptiste Kempf

playlist: Fetcher: Fix leak

(cherry picked from commit f96d78321a3a26cf0f70a8677894a83a7adefe30)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 src/playlist/fetcher.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/playlist/fetcher.c b/src/playlist/fetcher.c
index 41e0c32..a8b7b11 100644
--- a/src/playlist/fetcher.c
+++ b/src/playlist/fetcher.c
@@ -169,6 +169,14 @@ void playlist_fetcher_Delete( playlist_fetcher_t *p_fetcher )
     vlc_cond_destroy( &p_fetcher->wait );
     vlc_mutex_destroy( &p_fetcher->lock );
 
+    playlist_album_t album;
+    FOREACH_ARRAY( album, p_fetcher->albums )
+        free( album.psz_album );
+        free( album.psz_artist );
+        free( album.psz_arturl );
+    FOREACH_END()
+    ARRAY_RESET( p_fetcher->albums );
+
     free( p_fetcher );
 }
 



More information about the vlc-commits mailing list