mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-13 17:18:01 +03:00
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:
parent
d2c1222627
commit
3ab9652a86
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user