Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

CheckClose should be used with named returns #791

Closed
jfontan opened this issue Mar 26, 2018 · 0 comments · Fixed by #794
Closed

CheckClose should be used with named returns #791

jfontan opened this issue Mar 26, 2018 · 0 comments · Fixed by #794
Assignees
Labels

Comments

@jfontan
Copy link
Contributor

jfontan commented Mar 26, 2018

If defer CheckClose(closer, &err) is used without named returns any close error is lost. This happens here:

https://github.com/src-d/go-git/blob/master/plumbing/format/packfile/common.go#L50

Check if there are any other place where CheckClose is not used with a named return.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant