[lvm-devel] LVM2 ./WHATS_NEW lib/format_text/format-text.c
agk at sourceware.org
agk at sourceware.org
Tue Sep 30 20:37:53 UTC 2008
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2008-09-30 20:37:53
Modified files:
. : WHATS_NEW
lib/format_text: format-text.c
Log message:
Free text metadata buffer after a failure writing it.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.968&r2=1.969
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/format-text.c.diff?cvsroot=lvm2&r1=1.95&r2=1.96
--- LVM2/WHATS_NEW 2008/09/29 09:59:10 1.968
+++ LVM2/WHATS_NEW 2008/09/30 20:37:52 1.969
@@ -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.
--- LVM2/lib/format_text/format-text.c 2008/09/19 04:27:26 1.95
+++ LVM2/lib/format_text/format-text.c 2008/09/30 20:37:52 1.96
@@ -597,8 +597,15 @@
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;
}
More information about the lvm-devel
mailing list