Re: [PATCH v2] qemu: Pass / fill niothreads for qemuMonitorGetIOThreads

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

 



On 12/2/20 6:34 PM, John Ferlan wrote:
Let's pass along / fill @niothreads rather than trying to make dual
use as a return value and thread count.

This resolves a Coverity issue detected in qemuDomainGetIOThreadsMon
where if qemuDomainObjExitMonitor failed, then a -1 was returned and
overwrite @niothreads causing a memory leak.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---

  Since v1, updated the logic to pass @niothreads around rather than
  rely on the dual meaning. Took the full plunge.

  src/qemu/qemu_driver.c       | 23 +++++++++++------------
  src/qemu/qemu_monitor.c      |  8 +++++---
  src/qemu/qemu_monitor.h      |  3 ++-
  src/qemu/qemu_monitor_json.c |  6 ++++--
  src/qemu/qemu_monitor_json.h |  3 ++-
  src/qemu/qemu_process.c      |  4 ++--
  tests/qemumonitorjsontest.c  |  4 ++--
  7 files changed, 28 insertions(+), 23 deletions(-)

Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx>

Michal




[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