diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-06-13 17:55:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:17:24 -0500 |
commit | b5602cc4f1d77ed48ddca0f7f42b28706160c923 (patch) | |
tree | 60de388541b9c591d9ed90a71257174e4d721fcb /source/nsswitch | |
parent | 1b64f9a48bbb5a88c2029585e208865b41f2f423 (diff) | |
download | samba-b5602cc4f1d77ed48ddca0f7f42b28706160c923.tar.gz samba-b5602cc4f1d77ed48ddca0f7f42b28706160c923.tar.xz samba-b5602cc4f1d77ed48ddca0f7f42b28706160c923.zip |
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
Diffstat (limited to 'source/nsswitch')
-rw-r--r-- | source/nsswitch/winbindd_cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/nsswitch/winbindd_cache.c b/source/nsswitch/winbindd_cache.c index 0c096352d39..481dc41c6fe 100644 --- a/source/nsswitch/winbindd_cache.c +++ b/source/nsswitch/winbindd_cache.c @@ -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); if (ret == 0) { return NT_STATUS_OK; - } else if (ret == -1) { + } else if ((ret == -1) || (wcache_cred_list == NULL)) { return NT_STATUS_OBJECT_NAME_NOT_FOUND; } |