From 904d5d63b47661950c5eace94e9ba3341bd4cb1c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 9 Apr 2020 13:32:45 -0700 Subject: [PATCH] freedreno: Fix leak of binning shader variants. The v->binning variant is never added to shader->variants, so just free each one as we free the nonbinning variant. Noticed from drm-shim mode running out of open fds, since each bo ends up with an fd. Part-of: --- src/freedreno/ir3/ir3_shader.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/freedreno/ir3/ir3_shader.c b/src/freedreno/ir3/ir3_shader.c index cb0de2e8d65..e42f7713e09 100644 --- a/src/freedreno/ir3/ir3_shader.c +++ b/src/freedreno/ir3/ir3_shader.c @@ -48,6 +48,8 @@ delete_variant(struct ir3_shader_variant *v) ir3_destroy(v->ir); if (v->bo) fd_bo_del(v->bo); + if (v->binning) + delete_variant(v->binning); free(v); } -- 2.30.2