[vlc-devel] commit: Fix memory error handling (CID 123) ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Jun 1 10:58:20 CEST 2008
vlc | branch: 0.8.6-bugfix | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Jun 1 12:00:00 2008 +0300| [cee010baaa1e252f7aba56e49a5ef7293aab834c]
Fix memory error handling (CID 123)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cee010baaa1e252f7aba56e49a5ef7293aab834c
---
src/input/input.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index 72bd5c7..9c83245 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2039,7 +2039,7 @@ static int InputSourceInit( input_thread_t *p_input,
* (and do nothing with a list) */
char *psz_var_demux = var_GetString( p_input, "demux" );
- if( *psz_var_demux != '\0' &&
+ if( psz_var_demux && *psz_var_demux &&
!strchr(psz_var_demux, ',' ) &&
!strchr(psz_var_demux, ':' ) )
{
@@ -2047,10 +2047,7 @@ static int InputSourceInit( input_thread_t *p_input,
msg_Dbg( p_input, "enforced demux ` %s'", psz_demux );
}
- else if( psz_var_demux )
- {
- free( psz_var_demux );
- }
+ free( psz_var_demux );
}
/* Try access_demux if no demux given */
More information about the vlc-devel
mailing list