qemu-s390x
[Top][All Lists]
Advanced

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

[PULL 3/3] hw/vfio/ap: Plug memleak in vfio_ap_get_group()


From: Cornelia Huck
Subject: [PULL 3/3] hw/vfio/ap: Plug memleak in vfio_ap_get_group()
Date: Thu, 27 Aug 2020 14:20:57 +0200

From: Pan Nengyuan <pannengyuan@huawei.com>

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>
---
 hw/vfio/ap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index b9330a8e6fc8..cec6fe159932 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;
     }
 
-- 
2.25.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]