st/mesa: fix invalid pointer use in st_texture_get_sampler_view()
authorBrian Paul <brianp@vmware.com>
Fri, 18 Apr 2014 18:20:28 +0000 (12:20 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 21 Apr 2014 14:30:46 +0000 (08:30 -0600)
commit27496af67f1a15a3a9aa5d5e09d43d9365101f71
tree29b49b64d7782180bab96a4018fbcc5aeb412958
parent9fec560e63acd665870db9ab02f702ca677ce910
st/mesa: fix invalid pointer use in st_texture_get_sampler_view()

The '**used' pointer was pointing into the stObj->sampler_views array.
If 'free' was null, we'd realloc that array, thus making the 'used'
pointer invalid.  This soon led to memory errors.

Just change the pointer to be '*used' so it points directly at the
pipe_sampler_view.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/mesa/state_tracker/st_texture.c