mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cleanup: format1 test whether PV was found
Avoid dereferecing NULL pointer.
This commit is contained in:
parent
132306c888
commit
243cd3fd2c
@ -118,7 +118,10 @@ static int _fill_maps(struct dm_hash_table *maps, struct volume_group *vg,
|
||||
uint32_t i, lv_num, le;
|
||||
|
||||
dm_list_iterate_items(dl, pvds) {
|
||||
pv = find_pv(vg, dl->dev);
|
||||
if (!(pv = find_pv(vg, dl->dev))) {
|
||||
log_error("PV %s not found.", dl->dev->pvid);
|
||||
return 0;
|
||||
}
|
||||
e = dl->extents;
|
||||
|
||||
/* build an array of lv's for this pv */
|
||||
|
Loading…
Reference in New Issue
Block a user