contrib/vhost-user-blk: Clean up deallocation of VuVirtqElement

We allocate VuVirtqElement with g_malloc() in
virtqueue_alloc_element(), but free it with free() in
vhost-user-blk.c.  Harmless, but use g_free() anyway.

One of the calls is guarded by a "not null" condition.  Useless,
because it cannot be null (it's dereferenced right before), and even
it it could be, free() and g_free() do the right thing.  Drop the

Fixes: Coverity CID 1490290
Signed-off-by: Markus Armbruster <>
Reviewed-by: Raphael Norwitz <>
Acked-by: Michael S. Tsirkin <>
Message-Id: <>
Signed-off-by: Laurent Vivier <>
1 file changed