mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
gallium/rbug: correctly unreference a sampler view
This fixes heap corruption. The sampler view can be bound in the context, so we cannot call destroy directly. Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
91ddf49c87
commit
2f7714e071
1 changed files with 1 additions and 2 deletions
|
|
@ -153,8 +153,7 @@ rbug_sampler_view_destroy(struct rbug_context *rb_context,
|
|||
struct rbug_sampler_view *rb_view)
|
||||
{
|
||||
pipe_resource_reference(&rb_view->base.texture, NULL);
|
||||
rb_context->pipe->sampler_view_destroy(rb_context->pipe,
|
||||
rb_view->sampler_view);
|
||||
pipe_sampler_view_reference(&rb_view->sampler_view, NULL);
|
||||
FREE(rb_view);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue