zink: return false on failure
We do this in the other pipe_buffer_map_range failure case, so it makes sense that we need to do it here as well. If we don't, we'll end up taking a crash in the check_query_results function, which will dereference that pointer. We also need to unmap the buffer if we fail, otherwise we'll leak. CID: 1475925 Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12559>
This commit is contained in:
committed by
Marge Bot
parent
40f704f2f3
commit
077a9c7478
@@ -469,6 +469,8 @@ get_query_result(struct pipe_context *pctx,
|
||||
if (!xfb_results) {
|
||||
if (wait)
|
||||
debug_printf("zink: xfb qbo read failed!");
|
||||
pipe_buffer_unmap(pctx, xfer);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
check_query_results(query, result, is_timestamp ? 1 : qbo->num_results, results, xfb_results);
|
||||
|
||||
Reference in New Issue
Block a user