This is an automated email from the ASF dual-hosted git repository.
wongoo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-go-hessian2.git
The following commit(s) were added to refs/heads/master by this push:
new 6c7867e fix memory leak issue (#374)
6c7867e is described below
commit 6c7867eee6bccbaf5c1ebc15551704be9f31e896
Author: LQyt2012 <[email protected]>
AuthorDate: Sun Mar 9 13:06:47 2025 +0800
fix memory leak issue (#374)
---
string.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/string.go b/string.go
index b8b1f4e..b459801 100644
--- a/string.go
+++ b/string.go
@@ -332,7 +332,7 @@ func (d *Decoder) readStringChunkData(tag byte) ([]byte,
error) {
charCount += charRead
}
- return data[:end], nil
+ return append([]byte(nil), data[:end]...), nil
}
// decode2utf8 decode hessian2 buffer to utf8 buffer