From 346c7c5df2d4af60793490accb46f9dc396cab0e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Tue, 16 Oct 2007 15:42:15 +0000 Subject: [PATCH] libvlc: fix a memory leak --- src/libvlc-common.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libvlc-common.c b/src/libvlc-common.c index 25824c078a..01a329fdd5 100644 --- a/src/libvlc-common.c +++ b/src/libvlc-common.c @@ -818,7 +818,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, char *ppsz_argv[] ) } else if( psz_control && *psz_control ) { - if( psz_modules ) free( psz_modules ); + free( psz_modules ); psz_modules = strdup( psz_control ); } @@ -841,10 +841,8 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, char *ppsz_argv[] ) free( psz_temp ); } } - if ( psz_modules ) - { - free( psz_modules ); - } + free( psz_modules ); + free( psz_control ); /* * Always load the hotkeys interface if it exists -- 2.20.1