SSE: Fix goroutine leak in math operation expression parsing (#102380)

---------

Co-authored-by: Sam Jewell <sam.jewell@grafana.com>
This commit is contained in:
Kyle BrandtandSam Jewell authored and GitHub committed 2025-03-19 08:34:49 -04:00
1 parent 216b6e96a9
commit 3f2ef07872
3 files changed
+109 -11

No files matched your search

+4 -1
View File
@@ -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