Re: [PATCH] qemu: check for json allocation failure

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

 



On 10/13/2011 02:13 AM, Eric Blake wrote:

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 18d1c9f..cd8f1e5 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -1364,6 +1364,9 @@ int qemuMonitorJSONGetBlockInfo(qemuMonitorPtr mon,
      virJSONValuePtr reply = NULL;
      virJSONValuePtr devices;

+    if (!cmd)
+        return -1;
+
      ret = qemuMonitorJSONCommand(mon, cmd,&reply);
      if (ret == 0)
          ret = qemuMonitorJSONCheckError(cmd, reply);
ACK,

Peter.

--
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]