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:
@@ -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
|
||||
|
Reference in New Issue
Block a user