提交 73717ca0 编写于 作者: J John Ferlan

test: Return early in testQueryJobs

Avoid the chance that qemuMonitorTestNewSimple could return NULL

Found by Coverity
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
ACKed-by: NPeter Krempa <pkrempa@redhat.com>
上级 e8bf136c
...@@ -2959,6 +2959,9 @@ testQueryJobs(const void *opaque) ...@@ -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 ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册