]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fixed reference count in virsh pool-build command
authorDavid Allan <dallan@redhat.com>
Sun, 21 Feb 2010 14:28:34 +0000 (15:28 +0100)
committerDaniel Veillard <veillard@redhat.com>
Sun, 21 Feb 2010 14:28:34 +0000 (15:28 +0100)
* tools/virsh.c: call virStoragePoolFree() in the main path too

tools/virsh.c

index c8ae9f2d50425d28a6422702723181a721a340e3..dc9d44c017e54357767dcc7a232fe638621474f7 100644 (file)
@@ -4036,9 +4036,10 @@ cmdPoolBuild(vshControl *ctl, const vshCmd *cmd)
     } else {
         vshError(ctl, _("Failed to build pool %s"), name);
         ret = FALSE;
-        virStoragePoolFree(pool);
     }
 
+    virStoragePoolFree(pool);
+
     return ret;
 }