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>
This commit is contained in:
parent
386aea7774
commit
1f6f8e60ee
|
@ -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…
Reference in New Issue