mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
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: 0108deb944af5ca6f1da350c9d0352c8ed18738b 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…
x
Reference in New Issue
Block a user