diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c index 59581a4cd2ad15f863d0b87af89e22f8caea4ec9..e13122dd1ed36b70058cde89b32d532ccb131148 100644 --- a/hw/display/virtio-gpu-3d.c +++ b/hw/display/virtio-gpu-3d.c @@ -198,7 +198,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)) { @@ -208,6 +208,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); }