summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-11-27 17:38:53 +0100
committerErik Faye-Lund <[email protected]>2019-11-29 09:54:25 +0100
commitc8769ff8dd2eb9c9698f9608f97256708d6f1009 (patch)
tree9a602ad008bde3c288806f720ed78414a0428324 /src/gallium
parente54240f1531ac58f2eefb8df7294a12f187c1cc5 (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/zink/zink_batch.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c
index c31e175d6d6..a73128d4993 100644
--- a/src/gallium/drivers/zink/zink_batch.c
+++ b/src/gallium/drivers/zink/zink_batch.c
@@ -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);
}
}