SSE: Fix goroutine leak in math operation expression parsing (#102380)
--------- Co-authored-by: Sam Jewell <sam.jewell@grafana.com>
This commit is contained in:
co-authored by
Sam Jewell
parent
216b6e96a9
commit
3f2ef07872
@@ -140,7 +140,10 @@ func (t *Tree) startParse(funcs []map[string]Func, lex *lexer) {
|
||||
|
||||
// stopParse terminates parsing.
|
||||
func (t *Tree) stopParse() {
|
||||
t.lex = nil
|
||||
if t.lex != nil {
|
||||
t.lex.Close()
|
||||
t.lex = nil
|
||||
}
|
||||
}
|
||||
|
||||
// Parse parses the expression definition string to construct a representation
|
||||
|
||||
Reference in New Issue
Block a user