linux-avoid-returning-invalid-pointers-on-error-20090402
[openafs.git] / src / afs / VNOPS / afs_vnop_lookup.c
index 2c2bd3c..eeac33b 100644 (file)
@@ -1182,7 +1182,7 @@ afs_DoBulkStat(struct vcache *adp, long dirCookie, struct vrequest *areqp)
        afs_PutVolume(volp, READ_LOCK);
 
     /* If we did the InlineBulk RPC pull out the return code */
-    if (inlinebulk) {
+    if (inlinebulk && code == 0) {
        if ((&statsp[0])->errorCode) {
            afs_Analyze(tcp, (&statsp[0])->errorCode, &adp->f.fid, areqp,
                        AFS_STATS_FS_RPCIDX_BULKSTATUS, SHARED_LOCK, NULL);