diff --git a/tools/virsh.c b/tools/virsh.c index c8ae9f2d50..dc9d44c017 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -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; }