mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cov: validate altdev list is not empty
This commit is contained in:
parent
22672be97d
commit
d1c6da2f66
2
lib/cache/lvmcache.c
vendored
2
lib/cache/lvmcache.c
vendored
@ -1052,6 +1052,8 @@ next:
|
|||||||
log_debug_cache("PV %s with duplicates unselected using %s.",
|
log_debug_cache("PV %s with duplicates unselected using %s.",
|
||||||
pvid, dev_name(devl->dev));
|
pvid, dev_name(devl->dev));
|
||||||
goto next;
|
goto next;
|
||||||
|
} else if (dm_list_empty(&altdevs)) {
|
||||||
|
goto next;
|
||||||
} else {
|
} else {
|
||||||
devl = dm_list_item(dm_list_first(&altdevs), struct device_list);
|
devl = dm_list_item(dm_list_first(&altdevs), struct device_list);
|
||||||
dev1 = devl->dev;
|
dev1 = devl->dev;
|
||||||
|
Loading…
Reference in New Issue
Block a user