Commit 1e67b391 authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Dave Airlie

renderer: fix sampler views leaks

Fix found thanks to AddressSanitizer.
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent 595038e5
......@@ -3789,7 +3789,7 @@ vrend_renderer_fini(void)
static void vrend_destroy_sub_context(struct vrend_sub_context *sub)
{
int i;
int i, j;
struct vrend_streamout_object *obj, *tmp;
if (sub->fb_id)
......@@ -3826,6 +3826,10 @@ static void vrend_destroy_sub_context(struct vrend_sub_context *sub)
for (i = 0; i < PIPE_SHADER_TYPES; i++) {
free(sub->consts[i].consts);
sub->consts[i].consts = NULL;
for (j = 0; j < PIPE_MAX_SHADER_SAMPLER_VIEWS; j++) {
vrend_sampler_view_reference(&sub->views[i].views[j], NULL);
}
}
if (sub->zsurf)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment