Skip to content

Commit

Permalink
fix: parser: fix memory leak in goexpression.Func (fixes #916) (#935)
Browse files Browse the repository at this point in the history
  • Loading branch information
utrack authored Sep 27, 2024
1 parent f5e2469 commit a4638e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parser/v2/goexpression/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func Func(content string) (name, expr string, err error) {
err = errors.New("parser error: function identifier")
return false
}
expr = src[start:end]
expr = strings.Clone(src[start:end])
name = fn.Name.Name
return false
})
Expand Down

0 comments on commit a4638e3

Please sign in to comment.