]> xenbits.xensource.com Git - libvirt.git/commit
testUpdateQEMUCaps: Fix memory leak
authorTim Wiederhake <twiederh@redhat.com>
Tue, 20 Apr 2021 11:27:52 +0000 (13:27 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 21 Apr 2021 08:20:48 +0000 (10:20 +0200)
commit25af3e6cebe5d14925cfbd2fad379c739ac128b0
tree4b959148d600c12027697eba404e48be3d091197
parent903c4d0a53245c60a80b782a0bda80fb6aa61c43
testUpdateQEMUCaps: Fix memory leak

testUpdateQEMUCaps is called multiple times. Use virQEMUCapsUpdateHostCPUModel
instead of virQEMUCapsInitHostCPUModel to not overwrite (and leak) the
pointers in qemuCaps->kvm.hostCPU and qemuCaps->tcg.hostCPU.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemuxml2argvtest.c