mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-14 11:23:02 +02:00
Prevent memory leak (#213)
This commit is contained in:
parent
1bcc0c4afb
commit
6bc4b3e0e3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user