]> git.michaelhowe.org Git - packages/o/openafs.git/commit
libafs: don't call afs_PutDCache(NULL) in afs_GetDownD()
authorGarrett Wollman <wollman@csail.mit.edu>
Sat, 13 Aug 2011 22:51:02 +0000 (18:51 -0400)
committerDerrick Brashear <shadow@dementix.org>
Sun, 14 Aug 2011 02:53:07 +0000 (19:53 -0700)
commit8729eb3984a99d1c2994dbbde3df97cb5f51ae3e
tree7bfa49c6595e97306364e7f3798a2d451d4374f6
parent6fb10a85b1e7d0d80984c33d9e93e42115704f36
libafs: don't call afs_PutDCache(NULL) in afs_GetDownD()

It's possible for an eviction candidate to be omitted by the small
for loop (around line 670), leaving its reference in victimDCs
set to NULL.  In the big for loop that follows, don't call
afs_PutDCache() when we hit one.

Found-by: clang static analyzer with help from AFS_NONNULL
Reviewed-on: http://gerrit.openafs.org/5260
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 10d27341808be41b29fbcc09b8bd7523c3b7a541)

Change-Id: I4ff3ab9a57c1c48be0f7533ab3adb1e4b6ababf9
Reviewed-on: http://gerrit.openafs.org/5263
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/afs/afs_dcache.c