mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Avoid report segfault with non-partial inconsistent VG.
This commit is contained in:
parent
26e7f2e0c4
commit
1fa74f62e8
@ -68,7 +68,11 @@ static int _pvs_single(struct cmd_context *cmd, struct volume_group *vg,
|
|||||||
log_error("Can't lock %s: skipping", pv->vg_name);
|
log_error("Can't lock %s: skipping", pv->vg_name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
vg = vg_read(cmd, pv->vg_name, &consistent);
|
if (!(vg = vg_read(cmd, pv->vg_name, &consistent))) {
|
||||||
|
log_error("Can't read %s: skipping", pv->vg_name);
|
||||||
|
unlock_vg(cmd, pv->vg_name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!report_object(handle, vg, NULL, pv, NULL))
|
if (!report_object(handle, vg, NULL, pv, NULL))
|
||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
|
Loading…
Reference in New Issue
Block a user