Skip to content

Commit

Permalink
Merge pull request #127758 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.2-127711

release-23.2: sql/parser: fix memory leak of scanned comments
  • Loading branch information
mgartner authored Jul 29, 2024
2 parents cfbebc0 + 1df5dcc commit f52ea31
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/sql/scanner/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func (s *Scanner) Init(str string) {
// where we reuse a Scanner).
func (s *Scanner) Cleanup() {
s.bytesPrealloc = nil
s.Comments = nil
}

func (s *Scanner) allocBytes(length int) []byte {
Expand Down

0 comments on commit f52ea31

Please sign in to comment.