From 54fca7b1ca205cf30387e24d123ea4b7cf715c0b Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 8 Dec 2010 10:45:37 +0000 Subject: [PATCH] Remove reset of vg->vgmem pointer as it is access of already release memory This reset of vgmem pointer causes access of already released memory. (_vg_make_handle allocates vg from vgmem pool itself - which is a bit tricky) Interestingly this memory fault was missed by our test suite. --- WHATS_NEW | 1 + lib/metadata/metadata.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index 80a20b810..1544174fb 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.79 - =================================== + Fix write to released memory in vg_relase(). (2.02.78) Version 2.02.78 - 6th December 2010 =================================== diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index a6294cb52..d913df01c 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -3094,7 +3094,6 @@ void vg_release(struct volume_group *vg) vg->name); dm_pool_destroy(vg->vgmem); - vg->vgmem = NULL; } /* This is only called by lv_from_lvid, which is only called from