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

Fix coverity warning about null pointer dereference #6958

Merged
merged 1 commit into from
May 27, 2024
Merged

Conversation

svenklemm
Copy link
Member

@svenklemm svenklemm commented May 26, 2024

While the coverity warning is a false positive since rte->relkind is always either RELKIND_RELATION or RELKIND_VIEW this might not hold always true. This patch changes the if check to an Ensure and removes some nesting in the function.

Disable-check: force-changelog-file

While the coverity warning is a false positive since rte->relkind
is always either RELKIND_RELATION or RELKIND_VIEW this might not
hold always true. This patch changes the if check to an Ensure and
removes some nesting in the function.
@svenklemm svenklemm self-assigned this May 26, 2024
@svenklemm
Copy link
Member Author

Might want to review with whitespace ignored as it doesnt handle the changed indentation very well.

@fabriziomello
Copy link
Contributor

Do we need to backport it to 2.15.x?

@svenklemm
Copy link
Member Author

Did you run coverity on 2.15.x? If the trigger is in 2.15.x then we should include it. But overall it's mostly cosmetic change so we could pull it in even if coverity doesnt complain on 2.15.x

@fabriziomello
Copy link
Contributor

Did you run coverity on 2.15.x? If the trigger is in 2.15.x then we should include it. But overall it's mostly cosmetic change so we could pull it in even if coverity doesnt complain on 2.15.x

I didn't but the code that generated this coverity issue is present on 2.15.x branch so would be good to include it.

@svenklemm svenklemm added this to the TimescaleDB 2.15.1 milestone May 27, 2024
Copy link
Contributor

@antekresic antekresic left a comment

Choose a reason for hiding this comment

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

lgtm

@svenklemm svenklemm merged commit c4656f7 into main May 27, 2024
39 of 41 checks passed
@svenklemm svenklemm deleted the coverity_cagg branch May 27, 2024 07:29
@pallavisontakke pallavisontakke added the force-auto-backport Automatically backport this PR or fix of this issue, even if it's not marked as "bug" label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported-2.15.x coverity force-auto-backport Automatically backport this PR or fix of this issue, even if it's not marked as "bug"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants