[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH-for-5.0 0/3] virtio, vhost-gpu: Release memory returned by ma
From: |
Michael S. Tsirkin |
Subject: |
Re: [PATCH-for-5.0 0/3] virtio, vhost-gpu: Release memory returned by malloc() with free() |
Date: |
Mon, 23 Mar 2020 09:41:14 -0400 |
On Mon, Mar 23, 2020 at 12:29:40PM +0100, Philippe Mathieu-Daudé wrote:
> Coverity reported a ALLOC_FREE_MISMATCH in vg_handle_cursor(),
> because the memory returned by vu_queue_pop() is allocated with
> malloc(). Fix it.
>
> Similar error occurs with virtio. Document and fix.
I will queue this. Thanks!
> Philippe Mathieu-Daudé (3):
> vhost-user-gpu: Release memory returned by vu_queue_pop() with free()
> virtio: Document virtqueue_pop()
> virtio-gpu: Release memory returned by virtqueue_pop() with free()
>
> include/hw/virtio/virtio.h | 8 ++++++++
> contrib/vhost-user-gpu/vhost-user-gpu.c | 4 ++--
> contrib/vhost-user-gpu/virgl.c | 2 +-
> hw/display/virtio-gpu-3d.c | 2 +-
> hw/display/virtio-gpu.c | 8 ++++----
> 5 files changed, 16 insertions(+), 8 deletions(-)
>
> --
> 2.21.1