From 7d6fed35c0856e1bc31c4d6cdfdf186586543e53 Mon Sep 17 00:00:00 2001 From: Petr Rockai Date: Wed, 20 Jul 2011 21:27:28 +0000 Subject: [PATCH] lvmetad: Fix a possible infinite loop in vg_status. --- daemons/lvmetad/lvmetad-core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c index a30c40219..c6c220d9f 100644 --- a/daemons/lvmetad/lvmetad-core.c +++ b/daemons/lvmetad/lvmetad-core.c @@ -166,11 +166,8 @@ static int vg_status(lvmetad_state *s, const char *vgid) while (pv) { const char *uuid = find_config_str(pv->child, "id", NULL); - if (!uuid) - continue; // FIXME? - lock_pvs(s); - int found = dm_hash_lookup(s->pvs, uuid) ? 1 : 0; + int found = uuid ? (dm_hash_lookup(s->pvs, uuid) ? 1 : 0) : 0; unlock_pvs(s); if (!found) { unlock_vg(s, vgid); -- 2.43.5