Skip to content

Commit

Permalink
Fix: memory leak in tests/riot.go
Browse files Browse the repository at this point in the history
Using a goroutine in res.Body.Close() causes memory leaks
Probably related with: golang/go@6278a95
  • Loading branch information
suizman committed Dec 11, 2018
1 parent 12d31e9 commit b252f47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/riot.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func Attacker(goRoutineId int, c *Config, f func(j int, c *Config) ([]byte, erro
if err != nil {
log.Fatalf("Unable to perform request: %v", err)
}
defer res.Body.Close()
res.Body.Close()

if res.StatusCode != c.req.expectedStatusCode {
log.Fatalf("Server error: %v", res)
Expand Down

0 comments on commit b252f47

Please sign in to comment.