[vlc-devel] commit: Revert "Simplify - CID 6" ( Rémi Denis-Courmont )
Rafaël Carré
funman at videolan.org
Fri May 30 16:43:30 CEST 2008
Le Fri, 30 May 2008 16:16:23 +0200 (CEST),
git at videolan.org (git version control) a écrit :
> vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Fri
> May 30 17:17:33 2008 +0300| [0a3bbd165da498aff03220294585197727622ba6]
>
> Revert "Simplify - CID 6"
>
> This reverts commit 9ca4d5423b158b41090e9c0a621b5916fc040133 which
> introduces a segfault.
>
> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0a3bbd165da498aff03220294585197727622ba6
> ---
>
> modules/access/smb.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/modules/access/smb.c b/modules/access/smb.c
> index 83fcd07..4072071 100644
> --- a/modules/access/smb.c
> +++ b/modules/access/smb.c
> @@ -189,11 +189,11 @@ static int Open( vlc_object_t *p_this )
> *
> smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]] */
> if( !psz_user ) psz_user = var_CreateGetString( p_access,
> "smb-user" );
> - if( !*psz_user ) { free( psz_user ); psz_user = 0; }
> + if( psz_user && !*psz_user ) { free( psz_user ); psz_user = 0; }
> if( !psz_pwd ) psz_pwd = var_CreateGetString( p_access,
> "smb-pwd" );
> - if( !*psz_pwd ) { free( psz_pwd ); psz_pwd = 0; }
> + if( psz_pwd && !*psz_pwd ) { free( psz_pwd ); psz_pwd = 0; }
> if( !psz_domain ) psz_domain = var_CreateGetString( p_access,
> "smb-domain" );
> - if( !*psz_domain ) { free( psz_domain ); psz_domain = 0; }
> + if( psz_domain && !*psz_domain ) { free( psz_domain );
> psz_domain = 0; }
> #ifdef WIN32
> if( psz_user )
I was mistaken by __var_GetString() which shouldn't return
strdup( "" ), but NULL.
--
Rafaël Carré
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080530/df02364c/attachment.sig>
More information about the vlc-devel
mailing list