mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-24 20:32:22 +00:00
qemu: Don't double free @node_cpus in qemuProcessSetupPid()
When placing vCPUs into CGroups the qemuProcessSetupPid() is called which then enters a for() loop (around its middle) where it calls virDomainNumaGetNodeCpumask() for each guest NUMA node. But the latter returns only a pointer not new reference/copy and thus the caller must not free it. But the variable is decorated with g_autoptr() which leads to a double free. Fixes: 2d37d8dbc987d1998b4ad8029ba324b6bfe49799 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
509d9b5b9f
commit
310b37e486
@ -2741,8 +2741,7 @@ qemuProcessSetupPid(virDomainObj *vm,
|
||||
|
||||
/* Look for the guest NUMA node of this vCPU */
|
||||
for (i = 0; i < virDomainNumaGetNodeCount(numatune); i++) {
|
||||
g_autoptr(virBitmap) node_cpus = NULL;
|
||||
node_cpus = virDomainNumaGetNodeCpumask(numatune, i);
|
||||
virBitmap *node_cpus = virDomainNumaGetNodeCpumask(numatune, i);
|
||||
|
||||
if (!virBitmapIsBitSet(node_cpus, id))
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user