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:08:43 +0000 (19:08 -0700)
commit10d27341808be41b29fbcc09b8bd7523c3b7a541
treee08a727f73ffdaea83e9230f7fe71730c26ce3c9
parent5c0e92a159f11366a88adab4700e3f909124a06a
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.

Change-Id: Ib0891636a3479bf97cdeab823189e659cb261aa6
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>
src/afs/afs_dcache.c