1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

device_id: fix segfault if devices file has PVID=.

This commit is contained in:
Peter Rajnoha 2024-10-15 10:58:16 +02:00
parent 317fae4024
commit 8e3db44036
No known key found for this signature in database
GPG Key ID: E776664036DF84AB

View File

@ -3374,7 +3374,7 @@ void device_ids_validate(struct cmd_context *cmd, struct dm_list *scanned_devs,
int found_scanned = 1;
dm_list_iterate_items(devl, scanned_devs) {
du = get_du_for_dev(cmd, devl->dev);
if (du && !memcmp(du->pvid, devl->dev->pvid, ID_LEN))
if (du && du->pvid && !memcmp(du->pvid, devl->dev->pvid, ID_LEN))
continue;
found_scanned = 0;
break;