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.
This commit is contained in:
Nikolay Shirokovskiy 2016-12-12 12:13:42 +03:00 committed by John Ferlan
parent d2c1222627
commit 3ab9652a86

View File

@ -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)