1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-17 06:04:23 +03:00

cov: ensure fid is not null

This commit is contained in:
Zdenek Kabelac 2021-04-22 15:11:23 +02:00
parent 04fd55a0c9
commit e1287c3b71

View File

@ -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;
}