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>
This commit is contained in:
Rhys Perry
2020-08-06 14:17:31 +01:00
committed by Marge Bot
parent 27ec38d746
commit 30fca3b2e6

View File

@@ -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); clone_cf_list(&state, &dst->list, &src->list);
fixup_phi_srcs(&state); fixup_phi_srcs(&state);
if (!remap_table)
free_clone_state(&state);
} }
static nir_function_impl * static nir_function_impl *