diff options
author | Andy Pan <panjf2000@gmail.com> | 2022-11-16 12:46:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-16 06:46:28 +0200 |
commit | c367454ffe184d396c0fabc40e7b365e4c40231f (patch) | |
tree | 203e48dc8fc922f59dd5736643408c61dbacf42c /http.go | |
parent | Use time.Until(deadline) instead of -time.Since(deadline) (#1434) (diff) | |
download | fasthttp-c367454ffe184d396c0fabc40e7b365e4c40231f.tar.gz fasthttp-c367454ffe184d396c0fabc40e7b365e4c40231f.tar.bz2 fasthttp-c367454ffe184d396c0fabc40e7b365e4c40231f.zip |
Fix some potential pool leaks (#1433)
Diffstat (limited to 'http.go')
-rw-r--r-- | http.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1975,6 +1975,8 @@ func (resp *Response) String() string { func getHTTPString(hw httpWriter) string { w := bytebufferpool.Get() + defer bytebufferpool.Put(w) + bw := bufio.NewWriter(w) if err := hw.Write(bw); err != nil { return err.Error() @@ -1983,7 +1985,6 @@ func getHTTPString(hw httpWriter) string { return err.Error() } s := string(w.B) - bytebufferpool.Put(w) return s } |