From 9cc66e6f8b922e35dd6ad33cee181b68b5ea5cb3 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 23 Feb 2012 19:03:48 +0000 Subject: [PATCH] Fix regression from cleanup commit baton is being modified, so needs to be cleared before each use. --- lib/cache/lvmetad.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c index 5fedfd581..f82576513 100644 --- a/lib/cache/lvmetad.c +++ b/lib/cache/lvmetad.c @@ -229,7 +229,7 @@ int lvmetad_vg_update(struct volume_group *vg) char mda_id[128], *num; struct pv_list *pvl; struct lvmcache_info *info; - struct _fixup_baton baton = { .i = 0 }; + struct _fixup_baton baton; if (!vg) return 0; @@ -264,6 +264,7 @@ int lvmetad_vg_update(struct volume_group *vg) *num = 0; ++num; if ((info = lvmcache_info_from_pvid(mda_id, 0))) { + memset(&baton, 0, sizeof(baton)); baton.find = atoi(num); baton.ignore = mda_is_ignored(mda); lvmcache_foreach_mda(info, _fixup_ignored, &baton);