grammar: Adapt to pp interface change.
authorMichal Krol <michal@vmware.com>
Mon, 14 Sep 2009 11:08:16 +0000 (13:08 +0200)
committerMichal Krol <michal@vmware.com>
Mon, 14 Sep 2009 11:08:16 +0000 (13:08 +0200)
src/mesa/shader/grammar/grammar.c

index 54e94bb..ebfcef0 100644 (file)
@@ -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);