Re: [PATCH 4/7] qemu: Fix resource leak and coding error in qemuDomainGetIOThreadsMon

2020-12-02 Thread John Ferlan
On 12/2/20 9:44 AM, Ján Tomko wrote: > The commit summary uses 'and' which makes me think there are two > issues, but the commit message and code only seem to fix one. > True - I changed my mind multiple times on this one w/r/t how involved the fix should be. Originally I did have cleanup add

Re: [PATCH 4/7] qemu: Fix resource leak and coding error in qemuDomainGetIOThreadsMon

2020-12-02 Thread Ján Tomko
The commit summary uses 'and' which makes me think there are two issues, but the commit message and code only seem to fix one. On a Wednesday in 2020, John Ferlan wrote: If qemuDomainGetIOThreadsMon fails because qemuDomainObjExitMonitor fails, then a -1 is returned which overwrites @niothreads

[PATCH 4/7] qemu: Fix resource leak and coding error in qemuDomainGetIOThreadsMon

2020-12-02 Thread John Ferlan
If qemuDomainGetIOThreadsMon fails because qemuDomainObjExitMonitor fails, then a -1 is returned which overwrites @niothreads causing a memory leak. Let's pass @niothreads instead. Found by Coverity. Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 19 +-- 1 file changed,