libafs: fix vrequest leak in afs_lookup
authorMichael Meffie <mmeffie@sinenomine.net>
Tue, 29 Jul 2014 00:57:01 +0000 (20:57 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 6 Aug 2014 14:19:19 +0000 (10:19 -0400)
Fix vrequest leak introduced in commit
9930567bcf9655d3f562b210b2dc4b4a99226691.

Thanks to Andrew Deason for finding this error.

Change-Id: I8fc1391ab43f33c5a8208ff58d1d0641292cf63e
Reviewed-on: http://gerrit.openafs.org/11337
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/afs/VNOPS/afs_vnop_lookup.c

index 73f83e0..223b866 100644 (file)
@@ -1932,6 +1932,7 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acr
                code = afs_VerifyVCache(tvc, treq);
 #else
                afs_PutFakeStat(&fakestate);
+               afs_DestroyReq(treq);
                AFS_DISCON_UNLOCK();
                return 0;       /* can't have been any errors if hit and !code */
 #endif