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 <juhapekka.heikkila@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:

committed by
Tapani Pälli

parent
68a45b130e
commit
17e7cbe078
@@ -2749,6 +2749,11 @@ _mesa_parse_arb_program(struct gl_context *ctx, GLenum target, const GLubyte *st
|
|||||||
*/
|
*/
|
||||||
state->prog->Instructions =
|
state->prog->Instructions =
|
||||||
_mesa_alloc_instructions(state->prog->NumInstructions + 1);
|
_mesa_alloc_instructions(state->prog->NumInstructions + 1);
|
||||||
|
|
||||||
|
if (state->prog->Instructions == NULL) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
inst = state->inst_head;
|
inst = state->inst_head;
|
||||||
for (i = 0; i < state->prog->NumInstructions; i++) {
|
for (i = 0; i < state->prog->NumInstructions; i++) {
|
||||||
struct asm_instruction *const temp = inst->next;
|
struct asm_instruction *const temp = inst->next;
|
||||||
|
Reference in New Issue
Block a user