diff --git a/deviceauth.go b/deviceauth.go index e99c92f39..93503c73d 100644 --- a/deviceauth.go +++ b/deviceauth.go @@ -112,6 +112,7 @@ func retrieveDeviceAuth(ctx context.Context, c *Config, v url.Values) (*DeviceAu } body, err := io.ReadAll(io.LimitReader(r.Body, 1<<20)) + r.Body.Close() if err != nil { return nil, fmt.Errorf("oauth2: cannot auth device: %v", err) }