1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-09-16 09:06:36 +02:00

Prevent memory leak (#213)

This commit is contained in:
Paul
2018-12-19 22:12:37 +01:00
committed by Tim Voronov
parent 1bcc0c4afb
commit 6bc4b3e0e3

View File

@@ -394,6 +394,7 @@ func Download(_ context.Context, args ...core.Value) (core.Value, error) {
if err != nil {
return values.None, err
}
defer resp.Body.Close()
data, err := ioutil.ReadAll(resp.Body)
if err != nil {
return values.None, err