]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: Fix a wrong check in cmdEcho()
authorHongwei Bi <hwbi2008@gmail.com>
Tue, 17 Sep 2013 06:21:32 +0000 (14:21 +0800)
committerJán Tomko <jtomko@redhat.com>
Tue, 17 Sep 2013 07:15:18 +0000 (09:15 +0200)
What should be checked here is xmlbuf rather than buf.

tools/virsh.c

index bf2fbf81c7c094e10dae423497f71ef74832e690..ac354acda55a5c680d0c3168882ba2503919f5d5 100644 (file)
@@ -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;
             }