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 54e94bbf6a9577a88af2782916f0e8bc3372e926..ebfcef06800e210929f93622248e006c9b3a22f8 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);