[vlc-commits] dsm: free(NULL) is safe
Thomas Guillem
git at videolan.org
Thu May 21 17:10:50 CEST 2015
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu May 21 09:49:02 2015 +0200| [438dfdba74da1f8c808d59079560694081f61bf6] | committer: Thomas Guillem
dsm: free(NULL) is safe
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=438dfdba74da1f8c808d59079560694081f61bf6
---
modules/access/dsm/access.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/modules/access/dsm/access.c b/modules/access/dsm/access.c
index 2e47619..8e7fcdd 100644
--- a/modules/access/dsm/access.c
+++ b/modules/access/dsm/access.c
@@ -362,16 +362,14 @@ static void login_dialog( access_t *p_access )
if( psz_login != NULL )
{
- if( p_sys->creds.login != NULL )
- free( p_sys->creds.login );
+ free( p_sys->creds.login );
p_sys->creds.login = psz_login;
split_domain_login( &p_sys->creds.login, &p_sys->creds.domain );
}
if( psz_pass != NULL )
{
- if( p_sys->creds.password != NULL )
- free( p_sys->creds.password );
+ free( p_sys->creds.password );
p_sys->creds.password = psz_pass;
}
}
More information about the vlc-commits
mailing list