diff options
author | Juha-Pekka Heikkila <[email protected]> | 2014-04-02 16:13:58 +0300 |
---|---|---|
committer | Tapani Pälli <[email protected]> | 2014-04-02 19:54:37 +0300 |
commit | 17e7cbe078dc2d3556208212d07afe72489aae33 (patch) | |
tree | 03f4bee4710c0989b5eeeeeaae22427e20b2d61f /src/mesa/program | |
parent | 68a45b130e12d5a1d6c7dca20a930b9433ec1992 (diff) |
mesa: Add missing null check in _mesa_parse_arb_program()
Add missing null check in program_parse.tab.c through
program_parse.y
Signed-off-by: Juha-Pekka Heikkila <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r-- | src/mesa/program/program_parse.y | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y index 6dde69d5372..1664740b431 100644 --- a/src/mesa/program/program_parse.y +++ b/src/mesa/program/program_parse.y @@ -2749,6 +2749,11 @@ _mesa_parse_arb_program(struct gl_context *ctx, GLenum target, const GLubyte *st */ state->prog->Instructions = _mesa_alloc_instructions(state->prog->NumInstructions + 1); + + if (state->prog->Instructions == NULL) { + goto error; + } + inst = state->inst_head; for (i = 0; i < state->prog->NumInstructions; i++) { struct asm_instruction *const temp = inst->next; |