diff options
| author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-03-23 12:29:41 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2020-04-15 19:00:39 +0100 |
| commit | 4ff97121a3ee631971aadc87e3d4e7fb66f15aa8 (patch) | |
| tree | 8bd408e71b492c556f4dc0bc484df2106752abb3 /contrib/vhost-user-gpu/vhost-user-gpu.c | |
| parent | 6329df5b53a3307f289451137c9910da0f09adc6 (diff) | |
| download | focaccia-qemu-4ff97121a3ee631971aadc87e3d4e7fb66f15aa8.tar.gz focaccia-qemu-4ff97121a3ee631971aadc87e3d4e7fb66f15aa8.zip | |
vhost-user-gpu: Release memory returned by vu_queue_pop() with free()
vu_queue_pop() returns memory that must be freed with free(). Cc: qemu-stable@nongnu.org Reported-by: Coverity (CID 1421887 ALLOC_FREE_MISMATCH) Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'contrib/vhost-user-gpu/vhost-user-gpu.c')
| -rw-r--r-- | contrib/vhost-user-gpu/vhost-user-gpu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/vhost-user-gpu/vhost-user-gpu.c b/contrib/vhost-user-gpu/vhost-user-gpu.c index b45d2019b4..a019d0a9ac 100644 --- a/contrib/vhost-user-gpu/vhost-user-gpu.c +++ b/contrib/vhost-user-gpu/vhost-user-gpu.c @@ -848,7 +848,7 @@ vg_handle_ctrl(VuDev *dev, int qidx) QTAILQ_INSERT_TAIL(&vg->fenceq, cmd, next); vg->inflight++; } else { - g_free(cmd); + free(cmd); } } } @@ -939,7 +939,7 @@ vg_handle_cursor(VuDev *dev, int qidx) } vu_queue_push(dev, vq, elem, 0); vu_queue_notify(dev, vq); - g_free(elem); + free(elem); } } |