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:
John Ferlan 2019-07-23 08:09:19 -04:00
parent e8bf136cff
commit 73717ca074

View File

@ -2959,6 +2959,9 @@ testQueryJobs(const void *opaque)
size_t i;
int ret = -1;
if (!test)
return -1;
if (virAsprintf(&filenameJSON,
abs_srcdir "/qemumonitorjsondata/query-jobs-%s.json",
data->name) < 0 ||