提交 bf15f10a 编写于 作者: J John Ferlan

qemu: Resolve Coverity FORWARD_NULL

If the virJSONValueNewObject() fails, then rather than going to error
and getting a Coverity false positive since it doesn't seem to understand
the relationship between nkeywords, keywords, and values and seems to
believe calling qemuFreeKeywords will cause a NULL deref - just return NULL
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 60b029c7
......@@ -639,7 +639,7 @@ qemuMonitorJSONKeywordStringToJSON(const char *str, const char *firstkeyword)
size_t i;
if (!(ret = virJSONValueNewObject()))
goto error;
return NULL;
if (qemuParseKeywords(str, &keywords, &values, &nkeywords, 1) < 0)
goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册