Skip to content

Commit

Permalink
fix(methods): SyncMainData leak (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleSanderson authored Nov 25, 2024
1 parent b202d49 commit 054f851
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,8 @@ func (c *Client) SyncMainDataCtx(ctx context.Context, rid int64) (*MainData, err
return nil, errors.Wrap(err, "could not get main data")
}

defer resp.Body.Close()

var info MainData
if err := json.NewDecoder(resp.Body).Decode(&info); err != nil {
return nil, errors.Wrap(err, "could not unmarshal body")
Expand Down

0 comments on commit 054f851

Please sign in to comment.