mirror of
https://github.com/samba-team/samba.git
synced 2025-02-05 21:57:51 +03:00
r16196: A bit of defensive programming:
Klocwork ID 1773 complained about oldest being dereferenced in line 2275 where it could be NULL. I think you can construct extreme racy conditions where this actually could happen. Volker
This commit is contained in:
parent
1b64f9a48b
commit
b5602cc4f1
@ -2232,7 +2232,7 @@ NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const
|
|||||||
ret = tdb_traverse(cache->tdb, traverse_fn_get_credlist, NULL);
|
ret = tdb_traverse(cache->tdb, traverse_fn_get_credlist, NULL);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
} else if (ret == -1) {
|
} else if ((ret == -1) || (wcache_cred_list == NULL)) {
|
||||||
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
|
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user