gallium/u_threaded_context: fix use-after-free in transfer_unmap
discovered by valgrind
Fixes: fd6a5e112a
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6952>
This commit is contained in:
parent
706fef711b
commit
3dc00c33f0
|
@ -1610,9 +1610,9 @@ tc_transfer_unmap(struct pipe_context *_pipe, struct pipe_transfer *transfer)
|
|||
PIPE_MAP_DISCARD_RANGE)));
|
||||
|
||||
struct pipe_context *pipe = tc->pipe;
|
||||
pipe->transfer_unmap(pipe, transfer);
|
||||
util_range_add(&tres->b, tres->base_valid_buffer_range,
|
||||
transfer->box.x, transfer->box.x + transfer->box.width);
|
||||
pipe->transfer_unmap(pipe, transfer);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue