diff options
author | Carl Worth <cworth@cworth.org> | 2010-06-18 17:52:59 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-06-23 19:00:42 -0700 |
commit | 12c411504ca86341f8b96c349c15413ee198cc71 (patch) | |
tree | b6b00d8e7c8789b34d1e0f5686959dc95571b93f /ir_reader.cpp | |
parent | dc5811fd0c7600b165ddd4e04a0ccae69bb19ec8 (diff) |
Close memory leaks in glsl_type (constructor and get_array_instance)
Add a talloc ctx to both get_array_instance and the glsl_type
constructor in order to be able to call talloc_size instead of
malloc.
This fix now makes glsl-orangebook-ch06-bump.frag 99.99% leak free:
total heap usage: 55,623 allocs, 55,615
Only 8 missing frees now.
Diffstat (limited to 'ir_reader.cpp')
-rw-r--r-- | ir_reader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ir_reader.cpp b/ir_reader.cpp index d6985c4981..7383c42cbc 100644 --- a/ir_reader.cpp +++ b/ir_reader.cpp @@ -138,7 +138,7 @@ read_type(_mesa_glsl_parse_state *st, s_expression *expr) return NULL; } - return glsl_type::get_array_instance(base_type, size->value()); + return glsl_type::get_array_instance(st, base_type, size->value()); } else if (strcmp(type_sym->value(), "struct") == 0) { assert(false); // FINISHME } else { |