From: Rhys Perry Date: Thu, 6 Aug 2020 13:17:31 +0000 (+0100) Subject: nir: fix memory leak in nir_cf_list_clone X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=30fca3b2e65c6125c24894ed11b15e09a52b42e6;p=mesa.git nir: fix memory leak in nir_cf_list_clone Signed-off-by: Rhys Perry Reviewed-by: Eric Anholt Part-of: --- 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 *