mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
lvmetad: Fix a possible infinite loop in vg_status.
This commit is contained in:
parent
fba6c62b84
commit
bc0a902434
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user