diff options
author | Rhys Perry <pendingchaos02@gmail.com> | 2020-08-06 14:17:31 +0100 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2020-08-20 10:52:19 +0000 |
commit | 30fca3b2e65c6125c24894ed11b15e09a52b42e6 (patch) | |
tree | 44e48364f6ccf139b38e9e170e2791000a3ba785 | |
parent | 27ec38d746824046f780efa934d4f25c1c8b32a8 (diff) |
nir: fix memory leak in nir_cf_list_clone
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6206>
-rw-r--r-- | src/compiler/nir/nir_clone.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_clone.c b/src/compiler/nir/nir_clone.c index f57fce599c1..9e0bd7bf891 100644 --- a/src/compiler/nir/nir_clone.c +++ b/src/compiler/nir/nir_clone.c @@ -656,6 +656,9 @@ nir_cf_list_clone(nir_cf_list *dst, nir_cf_list *src, nir_cf_node *parent, clone_cf_list(&state, &dst->list, &src->list); fixup_phi_srcs(&state); + + if (!remap_table) + free_clone_state(&state); } static nir_function_impl * |