diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-04-22 15:11:23 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-04-23 23:00:55 +0200 |
commit | e1287c3b711d9d77221b0114dbb5ebd84c09ca48 (patch) | |
tree | 2a4efcbbc929ee422a0c698b05774c050285a1be | |
parent | 04fd55a0c9e721e8d73f067f886736377ba879e3 (diff) | |
download | lvm2-e1287c3b711d9d77221b0114dbb5ebd84c09ca48.tar.gz |
cov: ensure fid is not null
-rw-r--r-- | tools/pvscan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/pvscan.c b/tools/pvscan.c index 83f3f3983..df38e1758 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -1232,7 +1232,8 @@ static int _online_devs(struct cmd_context *cmd, int do_all, struct dm_list *pvs if (!vg) { log_print("pvscan[%d] PV %s has no VG metadata.", getpid(), dev_name(dev)); - fmt->ops->destroy_instance(fid); + if (fid) + fmt->ops->destroy_instance(fid); goto online; } |