From 15e26314b68b6f879ac494504f9e75c90ce289a0 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 13 Jun 2006 17:55:39 +0000 Subject: 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 used to be commit b5602cc4f1d77ed48ddca0f7f42b28706160c923) --- source3/nsswitch/winbindd_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c index 0c096352d3..481dc41c6f 100644 --- a/source3/nsswitch/winbindd_cache.c +++ b/source3/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; } -- cgit