mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
nsswitch: wbcFreeMemory deals fine with NULL
This commit is contained in:
parent
dcbfb6fc0b
commit
181b23ceed
@ -1899,9 +1899,7 @@ static int winbind_auth_request(struct pwb_context *ctx,
|
||||
}
|
||||
|
||||
done:
|
||||
if (logon.blobs) {
|
||||
wbcFreeMemory(logon.blobs);
|
||||
}
|
||||
wbcFreeMemory(logon.blobs);
|
||||
if (info && info->blobs && !p_info) {
|
||||
wbcFreeMemory(info->blobs);
|
||||
}
|
||||
|
@ -463,12 +463,8 @@ static bool wbinfo_get_sidaliases(const char *domain,
|
||||
wbcFreeMemory(alias_rids);
|
||||
|
||||
done:
|
||||
if (domain_sid_str) {
|
||||
wbcFreeMemory(domain_sid_str);
|
||||
}
|
||||
if (dinfo) {
|
||||
wbcFreeMemory(dinfo);
|
||||
}
|
||||
wbcFreeMemory(domain_sid_str);
|
||||
wbcFreeMemory(dinfo);
|
||||
return (WBC_ERR_SUCCESS == wbc_status);
|
||||
}
|
||||
|
||||
@ -1296,18 +1292,10 @@ static bool wbinfo_lookuprids(const char *domain, const char *arg)
|
||||
|
||||
ret = true;
|
||||
done:
|
||||
if (dinfo) {
|
||||
wbcFreeMemory(dinfo);
|
||||
}
|
||||
if (domain_name) {
|
||||
wbcFreeMemory(domain_name);
|
||||
}
|
||||
if (names) {
|
||||
wbcFreeMemory(names);
|
||||
}
|
||||
if (types) {
|
||||
wbcFreeMemory(types);
|
||||
}
|
||||
wbcFreeMemory(dinfo);
|
||||
wbcFreeMemory(domain_name);
|
||||
wbcFreeMemory(names);
|
||||
wbcFreeMemory(types);
|
||||
TALLOC_FREE(mem_ctx);
|
||||
return ret;
|
||||
}
|
||||
|
@ -463,9 +463,7 @@ static NTSTATUS ntlmssp_client_challenge(struct ntlmssp_state *ntlmssp_state,
|
||||
params.blobs = &auth_blob;
|
||||
|
||||
wbc_status = wbcCredentialCache(¶ms, &info, &error);
|
||||
if (error != NULL) {
|
||||
wbcFreeMemory(error);
|
||||
}
|
||||
wbcFreeMemory(error);
|
||||
if (!WBC_ERROR_IS_OK(wbc_status)) {
|
||||
goto noccache;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user