]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Remove unnecessary check in qemuMonitorJSONGetJobInfoOne
authorJohn Ferlan <jferlan@redhat.com>
Tue, 23 Jul 2019 12:03:21 +0000 (08:03 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 23 Jul 2019 14:55:56 +0000 (10:55 -0400)
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@redhat.com>
ACKed-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_monitor_json.c

index f19dced0143330b08e3410c0ddf6b8b8d9f811a0..d38b2f2cbe0364ebf99b10b7f5b99c7cd535bd22 100644 (file)
@@ -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;