shutdown-vcache-avoid-null-deref-20090324
[openafs.git] / src / afs / afs_vcache.c
index 8337283..d6322b0 100644 (file)
@@ -3286,7 +3286,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);
@@ -3341,7 +3341,8 @@ shutdown_vcache(void)
                    tvc->linkData = 0;
                }
 
-               afs_FreeAllAxs(&(tvc->Access));
+               if (tvc->Access)
+                   afs_FreeAllAxs(&(tvc->Access));
            }
            afs_vhashT[i] = 0;
        }