What should be checked here is xmlbuf rather then buf.
---
tools/virsh.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index bf2fbf8..ac354ac 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;
}
--
1.7.1