Fixes: CID 1503261.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18866>
/* output error if trying to unmap memory that is not previously mapped */
assert(bo->map);
+ VG(VALGRIND_FREELIKE_BLOCK(bo->map, 0));
+
/* Unmap the whole PMR from CPU space */
if (munmap(bo->map, bo->size))
vk_error(NULL, VK_ERROR_UNKNOWN);
- VG(VALGRIND_FREELIKE_BLOCK(bo->map, 0));
-
bo->map = NULL;
buffer_release(srv_bo);