In nir_cf_list_clone(), a state_clone object is initialized but never freed, causing a memory leak. If the remap_table argument is NULL, init_state will create a hash table for it, and that's what free_clone_state is supposed to free. --- src/compiler/nir/nir_clone.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/src/compiler/nir/nir_clone.c b/src/compiler/nir/nir_clone.c index bcfdaa7594..c823acb6ee 100644 --- a/src/compiler/nir/nir_clone.c +++ b/src/compiler/nir/nir_clone.c @@ -660,6 +660,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 * -- 2.11.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev