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

Minor Coverity Scan fixes #594

Merged
merged 6 commits into from
Sep 2, 2024
Merged

Minor Coverity Scan fixes #594

merged 6 commits into from
Sep 2, 2024

Conversation

troglobit
Copy link
Contributor

Description

Fixes minor Coverity weekly scan issues as well as some linter warnings from clang-tidy.

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Found by clang-tidy

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Found by clang-tidy

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
 - Silence linter, add braces
 - Unindent code block to reduce complexity

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit troglobit self-assigned this Sep 2, 2024
src/confd/src/ietf-syslog.c Outdated Show resolved Hide resolved
src/confd/src/ietf-syslog.c Outdated Show resolved Hide resolved
The srx_get_str() function may return NULL, which goes unchecked in
both fxlate() and sxlate(), as well as the calls to free().

Found by Coverity Scan

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Not much we can do, other than log and report.

Found by Coverity Scan

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Copy link
Contributor

@mattiaswal mattiaswal left a comment

Choose a reason for hiding this comment

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

🥇

@troglobit troglobit merged commit e7c9f59 into main Sep 2, 2024
4 checks passed
@troglobit troglobit deleted the coverity-fixes branch September 2, 2024 09:18
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