mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
cpu_x86: Fix memory leak - virCPUx86GetHost
Commit 56b254dcc called virCPUx86DataAdd, but returned -1 directly without calling the virCPUx86DataFree. Found by Coverity. Signed-off-by: John Ferlan <jferlan@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
0a5a547725
commit
5acb4eede2
@ -2791,7 +2791,7 @@ virCPUx86GetHost(virCPUDefPtr cpu,
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (virCPUx86DataAdd(cpuData, &item) < 0)
|
if (virCPUx86DataAdd(cpuData, &item) < 0)
|
||||||
return -1;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user