From 14ba3153efd9ccf3cb3cba7d15be87bf5757e2ee Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Tue, 24 Mar 2009 22:40:25 +0000 Subject: [PATCH] STABLE14-shutdown-vcache-avoid-null-deref-20090324 LICENSE IPL10 avoid potential null pointer deref at shutdown (cherry picked from commit 4162ff9d4d733afc788b3c002adc57aac78a3282) --- src/afs/afs_vcache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index d5e1bab5b6..4a214e4ea3 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -3072,7 +3072,7 @@ shutdown_vcache(void) */ { - register struct afs_q *tq, *uq; + register struct afs_q *tq, *uq = NULL; register struct vcache *tvc; for (tq = VLRU.prev; tq != &VLRU; tq = uq) { tvc = QTOV(tq); @@ -3127,7 +3127,8 @@ shutdown_vcache(void) tvc->linkData = 0; } - afs_FreeAllAxs(&(tvc->Access)); + if (tvc->Access) + afs_FreeAllAxs(&(tvc->Access)); } afs_vhashT[i] = 0; }