[vlc-devel] commit: Fix potential memleak (CID 260) ( Rémi Duraffort )
git version control
git at videolan.org
Wed Oct 8 22:06:34 CEST 2008
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Oct 8 22:05:46 2008 +0200| [cb89f6d527dc6920152c0a4248153bcb79221458] | committer: Rémi Duraffort
Fix potential memleak (CID 260)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cb89f6d527dc6920152c0a4248153bcb79221458
---
modules/demux/subtitle.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c
index 61b2311..bd89fba 100644
--- a/modules/demux/subtitle.c
+++ b/modules/demux/subtitle.c
@@ -1902,7 +1902,10 @@ static int ParseRealText( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
const char *s = TextGetLine( txt );
if( !s )
+ {
+ free( psz_text );
return VLC_EGENERIC;
+ }
int i_len = strlen( s );
if( i_len == 0 ) break;
More information about the vlc-devel
mailing list