]> sourceware.org Git - lvm2.git/commitdiff
cov: set error_vg only when pointer is non null
authorZdenek Kabelac <zkabelac@redhat.com>
Thu, 22 Apr 2021 10:41:25 +0000 (12:41 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 23 Apr 2021 20:58:45 +0000 (22:58 +0200)
lib/metadata/metadata.c

index 4471f7c8633fc25378e0bd50b02e6430cd73e44c..002d80c010cb2dcae44afdcb2953496972d715e2 100644 (file)
@@ -4954,7 +4954,8 @@ struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name, const
                log_very_verbose("Reading orphan VG %s.", vg_name);
                vg = vg_read_orphans(cmd, vg_name);
                *error_flags = 0;
-               *error_vg = NULL;
+               if (error_vg)
+                       *error_vg = NULL;
                return vg;
        }
 
This page took 0.044913 seconds and 5 git commands to generate.