mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 00:10:15 +00:00
vol: Free vol header on attach_volume_header error
In attach_volume_header, make sure we free the volume's header if we're returning an error. We take care of the locks and i/o handles in the immediately preceding block, but for an actual error we don't get rid of the header. Do so. Noticed by Tom Keiser. Change-Id: I97e61700f644066ac1a0e6b45a67dd62c5397034 Reviewed-on: http://gerrit.openafs.org/7325 Reviewed-by: Tom Keiser <tkeiser@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
f45ed29d5f
commit
ecfd9549fc
@ -3000,6 +3000,9 @@ attach_volume_header(Error *ec, Volume *vp, struct DiskPartition64 *partp,
|
||||
}
|
||||
|
||||
if (*ec) {
|
||||
VOL_LOCK;
|
||||
FreeVolumeHeader(vp);
|
||||
VOL_UNLOCK;
|
||||
return;
|
||||
}
|
||||
if (retry) {
|
||||
|
Loading…
Reference in New Issue
Block a user