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>
This commit is contained in:
parent
70c04a7ca2
commit
0216b18b79
@ -71,6 +71,7 @@ static VFIOGroup *vfio_ap_get_group(VFIOAPDevice *vapdev, Error **errp)
|
|||||||
if (!group_path) {
|
if (!group_path) {
|
||||||
error_setg(errp, "%s: no iommu_group found for %s: %s",
|
error_setg(errp, "%s: no iommu_group found for %s: %s",
|
||||||
VFIO_AP_DEVICE_TYPE, vapdev->vdev.sysfsdev, gerror->message);
|
VFIO_AP_DEVICE_TYPE, vapdev->vdev.sysfsdev, gerror->message);
|
||||||
|
g_error_free(gerror);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user