dafs-avoid-volhdr-leak-20070927

when there's an error don't leak the loaded header; release it
This commit is contained in:
Tom Keiser 2007-09-27 17:30:32 +00:00 committed by Derrick Brashear
parent 0ef8174a29
commit 29d5a11a1f

View File

@ -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;
}