[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/6] virtio-gpu: fix memory leak in error path
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 3/6] virtio-gpu: fix memory leak in error path |
Date: |
Wed, 13 Jan 2016 13:02:25 +0100 |
Found by Coverity Scan, buf not freed on error.
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/display/virtio-gpu-3d.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
index 28dccfd..d2af327 100644
--- a/hw/display/virtio-gpu-3d.c
+++ b/hw/display/virtio-gpu-3d.c
@@ -197,7 +197,7 @@ static void virgl_cmd_submit_3d(VirtIOGPU *g,
qemu_log_mask(LOG_GUEST_ERROR, "%s: size mismatch (%zd/%d)",
__func__, s, cs.size);
cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_PARAMETER;
- return;
+ goto out;
}
if (virtio_gpu_stats_enabled(g->conf)) {
@@ -207,6 +207,7 @@ static void virgl_cmd_submit_3d(VirtIOGPU *g,
virgl_renderer_submit_cmd(buf, cs.hdr.ctx_id, cs.size / 4);
+out:
g_free(buf);
}
--
1.8.3.1
- [Qemu-devel] [PATCH 0/6] virtio-gpu: fixes and spice preparation, Gerd Hoffmann, 2016/01/13
- [Qemu-devel] [PATCH 2/6] console: block rendering until client is done, Gerd Hoffmann, 2016/01/13
- [Qemu-devel] [PATCH 5/6] virtio-gpu: add support to enable/disable command processing, Gerd Hoffmann, 2016/01/13
- [Qemu-devel] [PATCH 1/6] zap qemu_egl_has_ext in include/ui/egl-helpers.h, Gerd Hoffmann, 2016/01/13
- [Qemu-devel] [PATCH 6/6] virtio-gpu: block any rendering until client (ui) is done, Gerd Hoffmann, 2016/01/13
- [Qemu-devel] [PATCH 3/6] virtio-gpu: fix memory leak in error path,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 4/6] virtio-gpu: maintain command queue, Gerd Hoffmann, 2016/01/13