提交 3ab9652a 编写于 作者: N Nikolay Shirokovskiy 提交者: John Ferlan

qemu: agent: fix uninitialized var case in qemuAgentGetFSInfo

In case of 0 filesystems *info is not set while according
to virDomainGetFSInfo contract user should call free on it even
in case of 0 filesystems. Thus we need to properly set
it. NULL will be enough as free eats NULLs ok.
上级 d2c12226
......@@ -1872,6 +1872,7 @@ qemuAgentGetFSInfo(qemuAgentPtr mon, virDomainFSInfoPtr **info,
ndata = virJSONValueArraySize(data);
if (!ndata) {
ret = 0;
*info = NULL;
goto cleanup;
}
if (VIR_ALLOC_N(info_ret, ndata) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册