diff options
author | Timothy Arceri <[email protected]> | 2016-11-18 11:51:59 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-11-18 23:39:40 +1100 |
commit | 88fe2c308ec0902b8f3980f9ce6ab6241ba74c14 (patch) | |
tree | 14703d1edc55e0c6907385554dff99a30aa8eb3a /src/mesa/program/ir_to_mesa.cpp | |
parent | da2a51129bfcb761d10a7a0b3c6579aa0adc5137 (diff) |
mesa: fix old classic drivers to use ralloc for ARB asm programs
These changes were missed in 0ad69e6b5.
Acked-by: Edward O'Callaghan <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98767
Diffstat (limited to 'src/mesa/program/ir_to_mesa.cpp')
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index c42c19b4110..b042c86f939 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2814,9 +2814,8 @@ get_mesa_program(struct gl_context *ctx, unsigned num_instructions = v.instructions.length(); - mesa_instructions = - (struct prog_instruction *)calloc(num_instructions, - sizeof(*mesa_instructions)); + mesa_instructions = rzalloc_array(prog, struct prog_instruction, + num_instructions); mesa_instruction_annotation = ralloc_array(v.mem_ctx, ir_instruction *, num_instructions); @@ -2948,7 +2947,7 @@ get_mesa_program(struct gl_context *ctx, return prog; fail_exit: - free(mesa_instructions); + ralloc_free(mesa_instructions); _mesa_reference_program(ctx, &shader->Program, NULL); return NULL; } |