mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-08 07:15:46 +00:00
test: Return early in testQueryJobs
Avoid the chance that qemuMonitorTestNewSimple could return NULL Found by Coverity Signed-off-by: John Ferlan <jferlan@redhat.com> ACKed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
e8bf136cff
commit
73717ca074
@ -2959,6 +2959,9 @@ testQueryJobs(const void *opaque)
|
|||||||
size_t i;
|
size_t i;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
|
if (!test)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (virAsprintf(&filenameJSON,
|
if (virAsprintf(&filenameJSON,
|
||||||
abs_srcdir "/qemumonitorjsondata/query-jobs-%s.json",
|
abs_srcdir "/qemumonitorjsondata/query-jobs-%s.json",
|
||||||
data->name) < 0 ||
|
data->name) < 0 ||
|
||||||
|
Loading…
Reference in New Issue
Block a user