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

notification: Ensure that g_autoptr variable is initialized #180

Merged
merged 1 commit into from
Jan 1, 2025

Conversation

smcv
Copy link
Contributor

@smcv smcv commented Jan 1, 2025

If the function early-returns (which it currently does not, but that would be a reasonable change to make) then we'd call g_object_unref() on uninitialized stack memory. gcc 14.2.0 in the freedesktop SDK 24.08 warns about this.

It's better to make sure that every autofreed variable is initialized, possibly to NULL.

If the function early-returns (which it currently does not, but that
would be a reasonable change to make) then we'd call g_object_unref()
on uninitialized stack memory. gcc 14.2.0 in the freedesktop SDK 24.08
warns about this.

It's better to make sure that every autofreed variable is initialized,
possibly to NULL.

Signed-off-by: Simon McVittie <[email protected]>
@TingPing TingPing merged commit 6819ada into flatpak:main Jan 1, 2025
15 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