Skip to content
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

Bug: check error on deferred file close #3667

Closed
MaxMcAdam opened this issue Feb 17, 2023 · 1 comment
Closed

Bug: check error on deferred file close #3667

MaxMcAdam opened this issue Feb 17, 2023 · 1 comment

Comments

@MaxMcAdam
Copy link
Contributor

Describe the bug.

file.Close() can return an error. This error should be checked even when the close is deferred.

Describe the steps to reproduce the behavior.

No response

Expected behavior.

No response

Screenshots.

No response

Operating Environment

all

Additional Information

No response

MaxMcAdam added a commit to MaxMcAdam/anax that referenced this issue Feb 17, 2023
MaxMcAdam added a commit to MaxMcAdam/anax that referenced this issue Feb 17, 2023
MaxMcAdam added a commit to MaxMcAdam/anax that referenced this issue Feb 17, 2023
Signed-off-by: Max McAdam <max@fredcom.com>
MaxMcAdam added a commit to MaxMcAdam/anax that referenced this issue Feb 17, 2023
Signed-off-by: Max McAdam <max@fredcom.com>
MaxMcAdam added a commit to MaxMcAdam/anax that referenced this issue Feb 17, 2023
Signed-off-by: Max McAdam <max@fredcom.com>
@bencourliss
Copy link
Member

See securego/gosec#512 (comment) for a potential way to fix this.

linggao pushed a commit that referenced this issue Feb 17, 2023
Signed-off-by: Max McAdam <max@fredcom.com>
@linggao linggao closed this as completed Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants