mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
dafs-avoid-volhdr-leak-20070927
when there's an error don't leak the loaded header; release it
This commit is contained in:
parent
0ef8174a29
commit
29d5a11a1f
@ -2755,12 +2755,14 @@ GetVolume(Error * ec, Error * client_ec, VolId volumeId, Volume * hint, int flag
|
||||
}
|
||||
}
|
||||
*ec = VOFFLINE;
|
||||
ReleaseVolumeHeader(vp->header);
|
||||
vp = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (V_attachState(vp) == VOL_STATE_UNATTACHED) {
|
||||
*ec = VOFFLINE;
|
||||
ReleaseVolumeHeader(vp->header);
|
||||
vp = NULL;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user