summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/compiler/nir/nir_split_per_member_structs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_split_per_member_structs.c b/src/compiler/nir/nir_split_per_member_structs.c
index c4de52d1461..592225ba644 100644
--- a/src/compiler/nir/nir_split_per_member_structs.c
+++ b/src/compiler/nir/nir_split_per_member_structs.c
@@ -183,8 +183,10 @@ nir_split_per_member_structs(nir_shader *shader)
var_to_member_map, dead_ctx);
progress |= split_variables_in_list(&shader->system_values, shader,
var_to_member_map, dead_ctx);
- if (!progress)
+ if (!progress) {
+ ralloc_free(dead_ctx);
return false;
+ }
nir_foreach_function(function, shader) {
if (!function->impl)