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

Addressing a few issues found by coverity #393

Merged
merged 2 commits into from
Aug 15, 2023

Conversation

daniloegea
Copy link
Collaborator

Description

Addressing CIDs 398341, 398340 and 398338.

Checklist

  • Runs make check successfully.
  • Retains 100% code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
  • (Optional) Adds example YAML for new feature.
  • (Optional) Closes an open bug in Launchpad.

@@ -2097,6 +2097,7 @@ handle_routes(NetplanParser* npp, yaml_node_t* node, __unused const void* _, GEr

err:
route_clear(&npp->current.route);
npp->current.route = NULL;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment: FWIW, I think this nullification is already being done, using the CLEAR_FROM_FREE macro. But I guess it doesn't hurt to do it manually again in the error case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm yeah, that's true. Coverity (and I) wasn't smart enough to see that I guess... well, if nothing, this line will eliminate an issue from the Coverity report.

Copy link
Collaborator

@slyon slyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 CI failures seem unrelated.

@daniloegea daniloegea merged commit 715fefb into canonical:main Aug 15, 2023
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants