[vlc-commits] zpl: Fix memory leaks
Rémi Duraffort
git at videolan.org
Fri Aug 9 10:28:57 CEST 2013
vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Aug 8 18:43:11 2013 +0200| [60409812d869972962f5cdf2f4be2ad4c4368c84] | committer: Jean-Baptiste Kempf
zpl: Fix memory leaks
(cherry picked from commit aa62e2309f23b3b52812d91a36b97eee073f56b9)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=60409812d869972962f5cdf2f4be2ad4c4368c84
---
modules/demux/playlist/zpl.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/demux/playlist/zpl.c b/modules/demux/playlist/zpl.c
index fb25e01..0628113 100644
--- a/modules/demux/playlist/zpl.c
+++ b/modules/demux/playlist/zpl.c
@@ -119,6 +119,7 @@ static int Demux( demux_t *p_demux )
char *psz_tabvalue = ParseTabValue( psz_parse );
if( !EMPTY_STR(psz_tabvalue) )
{
+ free( psz_mrl );
psz_mrl = ProcessMRL( psz_tabvalue, p_demux->p_sys->psz_prefix );
}
free( psz_tabvalue );
@@ -139,7 +140,10 @@ static int Demux( demux_t *p_demux )
#define PARSE(tag,variable) \
else if( !strncasecmp( psz_parse, tag, strlen( tag ) ) ) \
- variable = ParseTabValue( psz_parse );
+ { \
+ free( variable ); \
+ variable = ParseTabValue( psz_parse ); \
+ }
PARSE( "TT", psz_title )
PARSE( "TG", psz_genre )
More information about the vlc-commits
mailing list