From: Vadim Zhestikov Date: Wed, 22 Mar 2023 16:36:58 +0000 (-0700) Subject: Fixed invalid NULL pointer check. X-Git-Tag: 0.7.12~7 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=a17927ad627c81790d1a5c80a88f275aab128c2e;p=njs.git Fixed invalid NULL pointer check. This fixes Coverity issues CID 1524495 and CID 1524494. --- diff --git a/src/njs_parser.c b/src/njs_parser.c index f5f3b626..43ee69b9 100644 --- a/src/njs_parser.c +++ b/src/njs_parser.c @@ -8030,8 +8030,8 @@ njs_parser_export(njs_parser_t *parser, njs_lexer_token_t *token, return NJS_DONE; } - peek = njs_lexer_peek_token(parser->lexer, peek, 1); - if (njs_slow_path(token == NULL)) { + peek = njs_lexer_peek_token(parser->lexer, peek, 0); + if (njs_slow_path(peek == NULL)) { return NJS_ERROR; }