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

Avoid report segfault with non-partial inconsistent VG.

This commit is contained in:
Alasdair Kergon 2003-03-24 18:22:48 +00:00
parent 26e7f2e0c4
commit 1fa74f62e8

View File

@ -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);
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))
return ECMD_FAILED;