<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Sep 22, 2014 at 3:18 PM, Marek Olšák <span dir="ltr"><<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><br>
<br>
This fixes heap corruption. The sampler view can be bound in the context,<br>
so we cannot call destroy directly.<br>
---<br>
 src/gallium/drivers/rbug/rbug_objects.c | 3 +--<br>
 1 file changed, 1 insertion(+), 2 deletions(-)<br>
<br>
diff --git a/src/gallium/drivers/rbug/rbug_objects.c b/src/gallium/drivers/rbug/rbug_objects.c<br>
index db18f2e..320f34d 100644<br>
--- a/src/gallium/drivers/rbug/rbug_objects.c<br>
+++ b/src/gallium/drivers/rbug/rbug_objects.c<br>
@@ -153,8 +153,7 @@ rbug_sampler_view_destroy(struct rbug_context *rb_context,<br>
              struct rbug_sampler_view *rb_view)<br>
 {<br>
  pipe_resource_reference(&rb_view->base.texture, NULL);<br>
-Â Â rb_context->pipe->sampler_view_destroy(rb_context->pipe,<br>
-Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â rb_view->sampler_view);<br>
+Â Â pipe_sampler_view_reference(&rb_view->sampler_view, NULL);<br>
  FREE(rb_view);<br>
 }<br>
<span class=""><font color="#888888"></font></span><br></blockquote></div><br>Reviewed-by: Brian Paul <<a href="mailto:brianp@vmware.com">brianp@vmware.com</a>><br></div></div>