[vlc-devel] commit: Fix memleak when using --demux. ( Rémi Duraffort )
git version control
git at videolan.org
Wed Jun 24 16:24:46 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Jun 24 11:51:29 2009 +0200| [353a8120fb4b4ae66e4a21e7d2efc5e5383fba28] | committer: Rémi Duraffort
Fix memleak when using --demux.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=353a8120fb4b4ae66e4a21e7d2efc5e5383fba28
---
src/input/input.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index 4ddcbe9..93026e1 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2335,6 +2335,7 @@ static int InputSourceInit( input_thread_t *p_input,
const char *psz_access;
const char *psz_demux;
char *psz_path;
+ char *psz_var_demux = NULL;
double f_fps;
char *psz_dup = strdup( psz_mrl );
@@ -2402,7 +2403,7 @@ static int InputSourceInit( input_thread_t *p_input,
{
/* special hack for forcing a demuxer with --demux=module
* (and do nothing with a list) */
- char *psz_var_demux = var_GetNonEmptyString( p_input, "demux" );
+ psz_var_demux = var_GetNonEmptyString( p_input, "demux" );
if( psz_var_demux != NULL &&
!strchr(psz_var_demux, ',' ) &&
@@ -2643,6 +2644,7 @@ static int InputSourceInit( input_thread_t *p_input,
}
}
+ free( psz_var_demux );
free( psz_dup );
/* Set record capabilities */
@@ -2692,6 +2694,8 @@ error:
if( in->p_access )
access_Delete( in->p_access );
+
+ free( psz_var_demux );
free( psz_dup );
return VLC_EGENERIC;
More information about the vlc-devel
mailing list