diff options
author | Pan Nengyuan | 2020-08-14 18:02:31 +0200 |
---|---|---|
committer | Cornelia Huck | 2020-08-27 12:37:03 +0200 |
commit | 0216b18b79c432585b9cc49532c6223d766d552f (patch) | |
tree | 5a9fdeb33f884510a0a8463b4d5a185629436ae3 /hw/vfio | |
parent | docs/system/s390x: Add a chapter about s390x boot devices (diff) | |
download | qemu-0216b18b79c432585b9cc49532c6223d766d552f.tar.gz qemu-0216b18b79c432585b9cc49532c6223d766d552f.tar.xz qemu-0216b18b79c432585b9cc49532c6223d766d552f.zip |
hw/vfio/ap: Plug memleak in vfio_ap_get_group()
Missing g_error_free() in vfio_ap_get_group() error path. Fix that.
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Message-Id: <20200814160241.7915-3-pannengyuan@huawei.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/vfio')
-rw-r--r-- | hw/vfio/ap.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index b9330a8e6f..cec6fe1599 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -71,6 +71,7 @@ static VFIOGroup *vfio_ap_get_group(VFIOAPDevice *vapdev, Error **errp) if (!group_path) { error_setg(errp, "%s: no iommu_group found for %s: %s", VFIO_AP_DEVICE_TYPE, vapdev->vdev.sysfsdev, gerror->message); + g_error_free(gerror); return NULL; } |