qemu/hw/vfio
Greg Kurz be4d026f64 vfio-ccw: fix memory leaks in vfio_ccw_realize()
If the subchannel is already attached or if vfio_get_device() fails, the
code jumps to the 'out_device_err' label and doesn't free the string it
has just allocated.

The code should be reworked so that vcdev->vdev.name only gets set when
the device has been attached, and freed when it is about to be detached.
This could be achieved  with the addition of a vfio_ccw_get_device()
function that would be the counterpart of vfio_put_device(). But this is
a more elaborate cleanup that should be done in a follow-up. For now,
let's just add calls to g_free() on the buggy error paths.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <152311222681.203086.8874800175539040298.stgit@bahia>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2018-04-09 13:50:31 +02:00
..
amd-xgbe.c qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
calxeda-xgmac.c qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
ccw.c vfio-ccw: fix memory leaks in vfio_ccw_realize() 2018-04-09 13:50:31 +02:00
common.c vfio: Use a trace point when a RAM section cannot be DMA mapped 2018-04-05 10:48:52 -06:00
display.c vfio/display: adding dmabuf support 2018-03-13 11:17:30 -06:00
Makefile.objs vfio/display: core & wireup 2018-03-13 11:17:29 -06:00
pci-quirks.c vfio/pci: Add option to disable GeForce quirks 2018-02-06 11:08:27 -07:00
pci.c ppc/spapr, vfio: Turn off MSIX emulation for VFIO devices 2018-03-13 11:17:31 -06:00
pci.h vfio/display: adding region support 2018-03-13 11:17:30 -06:00
platform.c use g_path_get_basename instead of basename 2018-03-06 14:01:29 +01:00
spapr.c vfio, spapr: Fix levels calculation 2017-09-15 10:29:48 +10:00
trace-events vfio: Use a trace point when a RAM section cannot be DMA mapped 2018-04-05 10:48:52 -06:00