From e2b6de9a890c46ccff8efc118958fbcaf47e734e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 2 Mar 2015 14:01:54 +1000 Subject: [PATCH] renderer: drop reference to any shaders in sub context destroy. We were holding onto a reference for these, causing a leak. --- src/vrend_renderer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 972432d..7122a22 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -3204,6 +3204,10 @@ static void vrend_destroy_sub_context(struct vrend_sub_context *sub) glDeleteVertexArrays(1, &sub->vaoid); + vrend_shader_state_reference(&sub->vs, NULL); + vrend_shader_state_reference(&sub->fs, NULL); + vrend_shader_state_reference(&sub->gs, NULL); + vrend_free_programs(sub); glDeleteVertexArrays(1, &sub->vaoid);