[vlc-commits] zip: fix memory leak (cid #1062581)
Rémi Duraffort
git at videolan.org
Tue Oct 22 09:40:12 CEST 2013
vlc/vlc-2.0 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Oct 20 09:29:19 2013 +0200| [9ff2971a92bd6f3940841a84bca759f34d44bb10] | committer: Jean-Baptiste Kempf
zip: fix memory leak (cid #1062581)
(cherry picked from commit ed69a40c887aa7550a6e8f1505c9b6388a7d2e5e)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=9ff2971a92bd6f3940841a84bca759f34d44bb10
---
modules/access/zip/zipstream.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/access/zip/zipstream.c b/modules/access/zip/zipstream.c
index ac3f87c..51b6302 100644
--- a/modules/access/zip/zipstream.c
+++ b/modules/access/zip/zipstream.c
@@ -598,7 +598,12 @@ static int WriteXSPF( char **pp_buffer, vlc_array_t *p_filenames,
char *psz_path = strdup( psz_pathtozip );
char *psz_escapedName;
escapeToXml( &psz_escapedName, psz_name );
- if( astrcatf( &psz_path, "%s", psz_escapedName ) < 0 ) return -1;
+ if( astrcatf( &psz_path, "%s", psz_escapedName ) < 0 )
+ {
+ free( psz_escapedName );
+ return -1;
+ }
+ free( psz_escapedName );
/* Track information */
if( astrcatf( pp_buffer,
More information about the vlc-commits
mailing list