mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemu: monitor: clear cpu props properly in CPUInfoClear
Stay true to the name of the function and clear the pointer after freeing it. This also silences a bogus Coverity report about a double free in qemuMonitorGetCPUInfo where qemuMonitorCPUInfoClear is called right after allocating a new qemuMonitorCPUInfo to fill out the non-zero defaults. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
a8ed27e70a
commit
35ce344bfe
@ -1661,6 +1661,7 @@ qemuMonitorCPUInfoClear(qemuMonitorCPUInfoPtr cpus,
|
||||
VIR_FREE(cpus[i].alias);
|
||||
VIR_FREE(cpus[i].type);
|
||||
virJSONValueFree(cpus[i].props);
|
||||
cpus[i].props = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user