mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05: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: 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:
1 parent
7831011058
commit
53fe17bb23
1 file changed
+1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user