diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 3fd57fd2c7..568d61d001 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -661,7 +661,7 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd) if (virBufferError(&buf)) { vshPrint(ctl, "%s", _("Failed to allocate XML buffer")); - return false; + goto cleanup; } xml = virBufferContentAndReset(&buf);