diff --git a/src/vol/volume.c b/src/vol/volume.c index eeaa82415d..dc8a4b3dc7 100644 --- a/src/vol/volume.c +++ b/src/vol/volume.c @@ -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) {