mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
zink: avoid NULL-deref
zink_render_pass_reference will dereference the memory 'dst' points at, which can't really go well. All we want to do here is to increase the reference-count, so let's use a different helper for that instead. CoverityID: 1455200 Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
8e1dca35ab
commit
bda64440e4
1 changed files with 1 additions and 2 deletions
|
|
@ -210,9 +210,8 @@ reference_render_pass(struct zink_screen *screen,
|
|||
struct set_entry *entry = _mesa_set_search(prog->render_passes,
|
||||
render_pass);
|
||||
if (!entry) {
|
||||
struct zink_render_pass *tmp = NULL;
|
||||
entry = _mesa_set_add(prog->render_passes, render_pass);
|
||||
zink_render_pass_reference(screen, &tmp, render_pass);
|
||||
pipe_reference(NULL, &render_pass->reference);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue