virsh: Fix a wrong check in cmdEcho()

What should be checked here is xmlbuf rather than buf.
This commit is contained in:
Hongwei Bi 2013-09-17 14:21:32 +08:00 committed by Ján Tomko
parent 3efbe13f4d
commit 0925ad4e28

View File

@ -921,7 +921,7 @@ cmdEcho(vshControl *ctl, const vshCmd *cmd)
if (xml) { if (xml) {
virBufferEscapeString(&xmlbuf, "%s", arg); virBufferEscapeString(&xmlbuf, "%s", arg);
if (virBufferError(&buf)) { if (virBufferError(&xmlbuf)) {
vshPrint(ctl, "%s", _("Failed to allocate XML buffer")); vshPrint(ctl, "%s", _("Failed to allocate XML buffer"));
return false; return false;
} }