diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2016-04-21 20:23:13 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2016-04-22 14:15:36 +0200 |
commit | d564d9f39c73bdbb32413256586991993ad869ef (patch) | |
tree | 03921e09b77e79749daf5239110c0c75f2751040 | |
parent | 2dc6b9785658d7bf0cf97170e8e1467b522bded6 (diff) | |
download | lvm2-d564d9f39c73bdbb32413256586991993ad869ef.tar.gz |
coverity: is_used_pv needs valid pv pointer
-rw-r--r-- | lib/report/report.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/report/report.c b/lib/report/report.c index 08a609792..abf6a9e4b 100644 --- a/lib/report/report.c +++ b/lib/report/report.c @@ -3827,10 +3827,9 @@ int report_object(void *handle, int selection_only, const struct volume_group *v _dummy_fid.fmt = pv->fmt; } - if (vg && is_orphan_vg(vg->name) && is_used_pv(pv)) { + if (vg && is_orphan_vg(vg->name) && pv && is_used_pv(pv)) { obj.vg = &_unknown_vg; - if (pv) - _dummy_fid.fmt = pv->fmt; + _dummy_fid.fmt = pv->fmt; } return sh ? dm_report_object_is_selected(sh->selection_rh, &obj, 0, &sh->selected) |