discon getparentvcache leak fix

don't leak an unref'd vcache pointer if we are returning an error
(EAGAIN). thanks to Simon Wilkinson for catching this.

Change-Id: I40c5aa0fd50e1f2c76b09ba073a7109bca706d8c
Reviewed-on: http://gerrit.openafs.org/2511
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Derrick Brashear 2010-08-04 09:00:58 -04:00
parent 9bfae6b76c
commit 85e29294ee

View File

@ -531,8 +531,10 @@ afs_GetParentVCache(struct vcache *avc, int deleted, struct VenusFid *afid,
}
end:
if (code && *adp)
if (code && *adp) {
afs_PutVCache(*adp);
*adp = NULL;
}
return code;
}