ChimeraCoder / anaconda

A Go client library for the Twitter 1.1 API
MIT License
1.14k stars 247 forks source link

decodeResponse() has a memory leak #196

Closed carbocation closed 7 years ago

carbocation commented 7 years ago

The function decodeResponse() in twitter.go does not close the response body in all circumstances. Closure of Response.Body is required as per net/http, even when the body is not used. On my long-running server-side app, this leads to infinite memory growth over time.

Please see #195 for a pull request with a proposed fix.

muesli commented 7 years ago

@ChimeraCoder: This can be closed as #195 got merged.