[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/7] vhost-user-gpu: fix resource leak in 'vg_resource_create
From: |
P J P |
Subject: |
Re: [PATCH 2/7] vhost-user-gpu: fix resource leak in 'vg_resource_create_2d' |
Date: |
Wed, 5 May 2021 12:58:19 +0530 (IST) |
+-- On Tue, 4 May 2021, Li Qiang wrote --+
| Call 'vugbm_buffer_destroy' in error path to avoid resource leak.
|
| Signed-off-by: Li Qiang <liq3ea@163.com>
| ---
| contrib/vhost-user-gpu/vhost-user-gpu.c | 1 +
| 1 file changed, 1 insertion(+)
|
| diff --git a/contrib/vhost-user-gpu/vhost-user-gpu.c
b/contrib/vhost-user-gpu/vhost-user-gpu.c
| index f73f292c9f..b5e153d0d6 100644
| --- a/contrib/vhost-user-gpu/vhost-user-gpu.c
| +++ b/contrib/vhost-user-gpu/vhost-user-gpu.c
| @@ -349,6 +349,7 @@ vg_resource_create_2d(VuGpu *g,
| g_critical("%s: resource creation failed %d %d %d",
| __func__, c2d.resource_id, c2d.width, c2d.height);
| g_free(res);
| + vugbm_buffer_destroy(&res->buffer);
| cmd->error = VIRTIO_GPU_RESP_ERR_OUT_OF_MEMORY;
| return;
| }
* Looks good.
Reviewed-by: Prasad J Pandit <pjp@fedoraproject.org>
Thank you.
--
- P J P
8685 545E B54C 486B C6EB 271E E285 8B5A F050 DE8D
[PATCH 7/7] vhost-user-gpu: fix OOB write in 'virgl_cmd_get_capset', Li Qiang, 2021/05/05
[PATCH 5/7] vhost-user-gpu: fix memory leak in 'virgl_cmd_resource_unref', Li Qiang, 2021/05/05