e2core icon indicating copy to clipboard operation
e2core copied to clipboard

resp body needs to be closed at all times

Open javorszky opened this issue 3 years ago • 1 comments

In the httpsource code, the response body is only closed when the dest, one of the input parameters, is not nil, but the request that produces the response body gets called either way.

That can lead to situations where the request is sent, there's a response, but the body is not closed, leading to possible memory leaks.

Code is here: https://github.com/suborbital/atmo/blob/main/atmo/appsource/httpsource.go#L275-L276

javorszky avatar Feb 10 '22 12:02 javorszky

Hey, Can i work on this ?

ihrishix avatar Jun 30 '23 19:06 ihrishix