mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virQEMUCapsReset: also clear out hostCPUModel
After succesfully reading an outdated caps cache from disk,
calling virQEMUCapsReset did not properly clear out the calculated
host CPU model. This lead to a memory leak when the host CPU model
pointer was overwritten later in virQEMUCapsNewForBinaryInternal.
Introduced by commit 68c70118.
This commit is contained in:
@@ -3430,6 +3430,9 @@ virQEMUCapsReset(virQEMUCapsPtr qemuCaps)
|
||||
|
||||
VIR_FREE(qemuCaps->gicCapabilities);
|
||||
qemuCaps->ngicCapabilities = 0;
|
||||
|
||||
virCPUDefFree(qemuCaps->hostCPUModel);
|
||||
qemuCaps->hostCPUModel = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user