Browse Source

promql/parser: Cleanup generatedParserResult accross reuse

Reusing the same generatedParserResult ends up in strange panics:
See #7131 and #7127.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
pull/7132/head
Julien Pivotto 5 years ago
parent
commit
1f6f8e60ee
  1. 1
      promql/parser/parse.go

1
promql/parser/parse.go

@ -168,6 +168,7 @@ func newParser(input string) *parser {
p.injecting = false
p.parseErrors = nil
p.generatedParserResult = nil
// Clear lexer struct before reusing.
p.lex = Lexer{

Loading…
Cancel
Save