mirror of https://gitee.com/openkylin/libvirt.git
qemu: Add VIR_FREE in ADD_BITMAP
virBitmapFormat returns the string that should be freed.
All strings in three ADD_BITMAP calls in qemuDomainGetGuestVcpusParams
are contained in tmp. So memory leak is possible here without VIR_FREE.
Fixes: 0108deb944
Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
7831011058
commit
53fe17bb23
|
@ -18420,6 +18420,7 @@ qemuDomainGetGuestVcpusParams(virTypedParameterPtr *params,
|
|||
goto cleanup; \
|
||||
if (virTypedParamsAddString(&par, &npar, &maxpar, #name, tmp) < 0) \
|
||||
goto cleanup; \
|
||||
VIR_FREE(tmp)
|
||||
|
||||
ADD_BITMAP(vcpus);
|
||||
ADD_BITMAP(online);
|
||||
|
|
Loading…
Reference in New Issue