From 3d3685d3548f7e4fbabafb5b3a184486a5274c23 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 27 Jun 2019 14:09:05 -0700 Subject: [PATCH] iris: Fix memory leak of SO targets We need to pitch these on context destroy. --- src/gallium/drivers/iris/iris_state.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 8d7b2557b76..f1c4a6f7874 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -5624,6 +5624,10 @@ iris_destroy_state(struct iris_context *ice) } free(ice->state.genx); + for (int i = 0; i < 4; i++) { + pipe_so_target_reference(&ice->state.so_target[i], NULL); + } + for (unsigned i = 0; i < ice->state.framebuffer.nr_cbufs; i++) { pipe_surface_reference(&ice->state.framebuffer.cbufs[i], NULL); } -- 2.30.2