Found by covscan.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12592
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
{
const char *new_val = NULL;
+ if (username == NULL) {
+ return;
+ }
cli_credentials_parse_string(auth_info->creds,
username,
CRED_SPECIFIED);
new_val = cli_credentials_get_username(auth_info->creds);
- if (username != NULL && new_val == NULL) {
+ if (new_val == NULL) {
exit(ENOMEM);
}