From: Eric Anholt Date: Thu, 9 Apr 2020 20:32:45 +0000 (-0700) Subject: freedreno: Fix leak of binning shader variants. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=904d5d63b47661950c5eace94e9ba3341bd4cb1c;p=mesa.git 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: --- 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); }