]> sourceware.org Git - lvm2.git/commitdiff
Fix memory leak in _process_one_vg error path.
authorDave Wysochanski <dwysocha@redhat.com>
Wed, 15 Jul 2009 12:15:36 +0000 (12:15 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Wed, 15 Jul 2009 12:15:36 +0000 (12:15 +0000)
Author: Dave Wysochanski <dwysocha@redhat.com>

tools/toollib.c

index 75ce4c0fa9ca729dbbee69fc1c45a90557b51f84..8f38d494858dac160cc0bd1e2dc28e9e3ca348df 100644 (file)
@@ -432,8 +432,10 @@ static int _process_one_vg(struct cmd_context *cmd, const char *vg_name,
 
        vg = vg_read(cmd, vg_name, vgid, flags);
        if (vg_read_error(vg) == FAILED_ALLOCATION ||
-           vg_read_error(vg) == FAILED_NOTFOUND)
+           vg_read_error(vg) == FAILED_NOTFOUND) {
+               vg_release(vg);
                return ECMD_FAILED;
+       }
 
        if (!dm_list_empty(tags)) {
                /* Only process if a tag matches or it's on arg_vgnames */
This page took 0.032675 seconds and 5 git commands to generate.