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/7137/head
Julien Pivotto 5 years ago
parent e2c06a8898
commit 7eedcc708e

@ -169,6 +169,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