summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2013-12-14 07:15:00 -0700
committerCarl Worth <cworth@cworth.org>2014-01-02 15:57:40 -0800
commitffd89b27a787752468b9f6aa41068f2d4812e38e (patch)
tree592e6b98bb504797cba1e988093200a30cf4b381 /src/mesa
parentb0ee1b1748f5ffb31dabc548d984cba9f58a5b98 (diff)
st/mesa: use pipe_sampler_view_release()
This fixes a crash where old_view->context was already freed in the pipe_sampler_view_reference function contained in src/gallium/auxiliary/utils/u_inlines.h. As a result, the sampler_view_destroy function pointer contained 0xfeeefeee indicating freed heap memory. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> (cherry picked from commit 670be71bd801fea876f7512865ed5f54340da9be)
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_atom_texture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
index d79e04cf49c..bd0a22dde42 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -255,7 +255,7 @@ update_single_texture(struct st_context *st,
stObj->base.DepthMode) ||
(view_format != stObj->sampler_view->format) ||
stObj->base.BaseLevel != stObj->sampler_view->u.tex.first_level) {
- pipe_sampler_view_reference(&stObj->sampler_view, NULL);
+ pipe_sampler_view_release(pipe, &stObj->sampler_view);
}
}