Commit 73a617b5 authored by Hannes Domani's avatar Hannes Domani Committed by Jean-Baptiste Kempf

zip: fix memory leaks

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent b1665d3d
...@@ -121,6 +121,13 @@ inline static void free_all_node( node *root ) ...@@ -121,6 +121,13 @@ inline static void free_all_node( node *root )
{ {
free_all_node( root->child ); free_all_node( root->child );
free( root->name ); free( root->name );
item *media = root->media;
while( media )
{
item *next_media = media->next;
free( media );
media = next_media;
}
node *tmp = root->next; node *tmp = root->next;
free( root ); free( root );
root = tmp; root = tmp;
...@@ -563,6 +570,7 @@ static int WriteXSPF( char **pp_buffer, vlc_array_t *p_filenames, ...@@ -563,6 +570,7 @@ static int WriteXSPF( char **pp_buffer, vlc_array_t *p_filenames,
/* Root node */ /* Root node */
node *playlist = new_node( psz_zip ); node *playlist = new_node( psz_zip );
free( psz_zip );
/* Encode the URI and append ZIP_SEP */ /* Encode the URI and append ZIP_SEP */
char *psz_pathtozip; char *psz_pathtozip;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment