From 0925ad4e282125fb7e94f2dffc731cf3f1b3eacc Mon Sep 17 00:00:00 2001 From: Hongwei Bi Date: Tue, 17 Sep 2013 14:21:32 +0800 Subject: [PATCH] virsh: Fix a wrong check in cmdEcho() What should be checked here is xmlbuf rather than buf. --- tools/virsh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh.c b/tools/virsh.c index bf2fbf81c7..ac354acda5 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -921,7 +921,7 @@ cmdEcho(vshControl *ctl, const vshCmd *cmd) if (xml) { virBufferEscapeString(&xmlbuf, "%s", arg); - if (virBufferError(&buf)) { + if (virBufferError(&xmlbuf)) { vshPrint(ctl, "%s", _("Failed to allocate XML buffer")); return false; }