[PATCH] tools: Fix a wrong check in cmdEcho()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]