-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed unclosed tmp file handle in filestore.go #6386
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
FYI CI complaining about |
checked locally with linter, it seems that I touched empty line:
Should I fix it with new commit to this PR? |
Please, although if you can squash down to a single commit, that'd be even better. |
Signed-off-by: Neil Twigg <neil@nats.io>
Signed-off-by: Neil Twigg <neil@nats.io>
Static analyzer found unclosed filehandle tmpFD in case of errors. It is not strictly necessary as GC will eventually close tmpFD, but explicit call of Close is always better than magic finalizer. Signed-off-by: Dmitry Dorofeev <dima@yasp.com>
I think the reason you have |
I guess it will be easier to make completely new PR with just one commit, my git-fu is not that good :-) |
Reopened as #6390 |
Static analyzer found unclosed filehandle tmpFD in case of errors. It is not strictly necessary as GC will eventually close tmpFD, but explicit call of Close is always better than magic finalizer.
Based on the discussion on SO
Signed-off-by: Dmitry Dorofeev dima@yasp.com