Browse Source

zink: avoid NULL-deref

Same story as the previous two commits; these functions dereference the
memory they are pointed at. We can't do that.

CoverityID: 1455180
Reviewed-by: Dave Airlie <airlied@redhat.com>
master
Erik Faye-Lund 7 years ago
parent
commit
c8769ff8dd
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/gallium/drivers/zink/zink_batch.c

+ 1
- 2
src/gallium/drivers/zink/zink_batch.c View File

@@ -113,8 +113,7 @@ zink_batch_reference_sampler_view(struct zink_batch *batch,
{
struct set_entry *entry = _mesa_set_search(batch->sampler_views, sv);
if (!entry) {
struct pipe_sampler_view *tmp = NULL;
entry = _mesa_set_add(batch->sampler_views, sv);
pipe_sampler_view_reference(&tmp, &sv->base);
pipe_reference(NULL, &sv->base.reference);
}
}

Loading…
Cancel
Save