Skip to content

Commit

Permalink
fix possible fd leak
Browse files Browse the repository at this point in the history
  • Loading branch information
polym committed Feb 13, 2017
1 parent 6aa1b0f commit 1350b5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upyun/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ func (up *UpYun) List(config *GetObjectsConfig) error {
}
return err
}
defer resp.Body.Close()

b, err := ioutil.ReadAll(resp.Body)
resp.Body.Close()
if err != nil {
return fmt.Errorf("ioutil ReadAll: %v", err)
}
Expand Down

0 comments on commit 1350b5c

Please sign in to comment.