[PATCH 1/4] qemu: Remove unnecessary check in qemuMonitorJSONGetJobInfoOne

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

 



It's already dereffed in the initialization and shouldn't be NULL
unless virJSONValueArraySize after a virJSONValueObjectGetArray
could return a NULL data entry.

Found by Coverity

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/qemu/qemu_monitor_json.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index f19dced014..d38b2f2cbe 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -9133,9 +9133,6 @@ qemuMonitorJSONGetJobInfoOne(virJSONValuePtr data)
     VIR_AUTOPTR(qemuMonitorJobInfo) job = NULL;
     qemuMonitorJobInfoPtr ret = NULL;
 
-    if (!data)
-        return NULL;
-
     if (VIR_ALLOC(job) < 0)
         return NULL;
 
-- 
2.20.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]

  Powered by Linux