Skip to content

virtio,vhost-gpu: Release memory returned by malloc() with free()

Philippe Mathieu-Daudé qemu-devel 1 version NAK

Status from this message: nack, hw/virtio/virtio.c uses gmalloc (or I am missing something)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 9 repliesNAK

Patches in v1

#Subject and filesSizeRepliesApplied
1/3vhost-user-gpu: Release memory returned by vu_queue_pop() with free()contrib/vhost-user-gpu/vhost-user-gpu.c contrib/vhost-user-gpu/virgl.c+3 -32 replies
2/3virtio: Document virtqueue_pop()include/hw/virtio/virtio.h+8 -03 replies
3/3virtio-gpu: Release memory returned by virtqueue_pop() with free()hw/display/virtio-gpu-3d.c hw/display/virtio-gpu.c+5 -51 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchMarc-André Lureau
1/3R-b
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH-for-5.0 0/3] virtio,vhost-gpu: Release memory returned by malloc() with free()

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.

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(-)
Signature · 1 line
2.21.1