summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/shader/grammar/grammar.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/shader/grammar/grammar.c b/src/mesa/shader/grammar/grammar.c
index 54e94bbf6a9..ebfcef06800 100644
--- a/src/mesa/shader/grammar/grammar.c
+++ b/src/mesa/shader/grammar/grammar.c
@@ -3149,7 +3149,10 @@ grammar_fast_check (grammar id,
return 0;
}
- sl_pp_context_init(&context);
+ if (sl_pp_context_init(&context)) {
+ free(outbuf);
+ return 1;
+ }
if (sl_pp_tokenise(&context, outbuf, &intokens)) {
sl_pp_context_destroy(&context);