1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Free text metadata buffer after a failure writing it.

This commit is contained in:
Alasdair Kergon 2008-09-30 20:37:52 +00:00
parent 8cac933c71
commit 8c317baf19
2 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.41 -
=====================================
Free text metadata buffer after a failure writing it.
Fix misleading error message when there is no allocatable extents in VG.
Fix handling of PVs which reappeared with old metadata version.
Fix mirror DSO to call vgreduce with proper parameters.

View File

@ -597,8 +597,15 @@ static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,
r = 1;
out:
if (!r && !dev_close(mdac->area.dev))
stack;
if (!r) {
if (!dev_close(mdac->area.dev))
stack;
if (fidtc->raw_metadata_buf) {
dm_free(fidtc->raw_metadata_buf);
fidtc->raw_metadata_buf = NULL;
}
}
return r;
}