[vlc-commits] zip: fix memory leaks
Hannes Domani
git at videolan.org
Sat Feb 7 16:32:19 CET 2015
vlc | branch: master | Hannes Domani <ssbssa at yahoo.de> | Fri Feb 6 13:59:29 2015 +0100| [73a617b57af45a269964ce7990d199c664d48f62] | committer: Jean-Baptiste Kempf
zip: fix memory leaks
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=73a617b57af45a269964ce7990d199c664d48f62
---
modules/access/zip/zipstream.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/access/zip/zipstream.c b/modules/access/zip/zipstream.c
index ac29c7a..a8c188b 100644
--- a/modules/access/zip/zipstream.c
+++ b/modules/access/zip/zipstream.c
@@ -121,6 +121,13 @@ inline static void free_all_node( node *root )
{
free_all_node( root->child );
free( root->name );
+ item *media = root->media;
+ while( media )
+ {
+ item *next_media = media->next;
+ free( media );
+ media = next_media;
+ }
node *tmp = root->next;
free( root );
root = tmp;
@@ -563,6 +570,7 @@ static int WriteXSPF( char **pp_buffer, vlc_array_t *p_filenames,
/* Root node */
node *playlist = new_node( psz_zip );
+ free( psz_zip );
/* Encode the URI and append ZIP_SEP */
char *psz_pathtozip;
More information about the vlc-commits
mailing list