From: John Ferlan Date: Tue, 23 Jul 2019 12:03:21 +0000 (-0400) Subject: qemu: Remove unnecessary check in qemuMonitorJSONGetJobInfoOne X-Git-Tag: v5.6.0-rc1~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8bf136cff61020966a86077dbc538f7e08a7a7a;p=thirdparty%2Flibvirt.git qemu: Remove unnecessary check in qemuMonitorJSONGetJobInfoOne 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 ACKed-by: Peter Krempa --- 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;