Re: [libvirt PATCH 3/3] virQEMUCapsSetHostModel: Fix memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 15, 2021 at 17:08:28 +0200, Tim Wiederhake wrote:
> virQEMUCapsSetHostModel is called by virQEMUCapsInitHostCPUModel,
> which in turn is typically called twice (for KVM and QEMU), e.g. in
> virQEMUCapsLoadCache and virQEMUCapsNewForBinaryInternal.
> 
> The second call leaks memory pointed to by "reported", "migratable"
> and "full".

That sounds to me like a usage problem in the caller, where if it's
called twice it's either using a non-cleared variable, or the value will
be overwritten and thus calling it in the first place is probably
dubious, so the proposed patch feels to me like it's fixing a symptom
rather than the real problem.




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux