mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-27 18:04:20 +03:00
devs: check for no dev when dropping aliases
When scanning fails to find a device path and looks for device aliases, check if the device itself still exists to avoid a potential segfault.
This commit is contained in:
parent
219c4c2ce2
commit
f50af80199
@ -734,6 +734,11 @@ static int _scan_list(struct cmd_context *cmd, struct dev_filter *f,
|
||||
retried_open = 1;
|
||||
|
||||
dm_list_iterate_items_safe(devl, devl2, &reopen_devs) {
|
||||
if (!devl->dev) {
|
||||
dm_list_del(&devl->list);
|
||||
continue;
|
||||
}
|
||||
|
||||
_drop_bad_aliases(devl->dev);
|
||||
|
||||
if (dm_list_empty(&devl->dev->aliases)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user