summaryrefslogtreecommitdiff
path: root/ast_to_hir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ast_to_hir.cpp')
-rw-r--r--ast_to_hir.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp
index 38e344f0d2..ddd4b73266 100644
--- a/ast_to_hir.cpp
+++ b/ast_to_hir.cpp
@@ -2354,6 +2354,7 @@ ir_rvalue *
ast_struct_specifier::hir(exec_list *instructions,
struct _mesa_glsl_parse_state *state)
{
+ void *ctx = talloc_parent(state);
unsigned decl_count = 0;
/* Make an initial pass over the list of structure fields to determine how
@@ -2416,7 +2417,7 @@ ast_struct_specifier::hir(exec_list *instructions,
name = this->name;
}
- glsl_type *t = new glsl_type(fields, decl_count, name);
+ glsl_type *t = new(ctx) glsl_type(fields, decl_count, name);
YYLTYPE loc = this->get_location();
if (!state->symbols->add_type(name, t)) {