[vlc-commits] ntservice: Don't attempt to concatenate with an empty string
Hugo Beauzée-Luyssen
git at videolan.org
Tue Feb 14 15:30:39 CET 2017
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Feb 14 14:30:13 2017 +0100| [55aa018bbbd8aed408a05432fbac8cb0f1e11dd6] | committer: Hugo Beauzée-Luyssen
ntservice: Don't attempt to concatenate with an empty string
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55aa018bbbd8aed408a05432fbac8cb0f1e11dd6
---
modules/control/ntservice.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/control/ntservice.c b/modules/control/ntservice.c
index 66cac56..eecfee8 100644
--- a/modules/control/ntservice.c
+++ b/modules/control/ntservice.c
@@ -197,12 +197,12 @@ static int NTServiceInstall( intf_thread_t *p_intf )
sprintf( psz_path, "\"%s\" -I "MODULE_STRING, FromT(psz_pathtmp) );
psz_extra = var_InheritString( p_intf, "ntservice-extraintf" );
- if( psz_extra )
+ if( psz_extra && *psz_extra )
{
strcat( psz_path, " --ntservice-extraintf " );
strncat( psz_path, psz_extra, MAX_PATH - strlen( psz_path ) - 1 );
- free( psz_extra );
}
+ free( psz_extra );
psz_extra = var_InheritString( p_intf, "ntservice-options" );
if( psz_extra && *psz_extra )
More information about the vlc-commits
mailing list