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

GVariant, GError and g_autoptr cleanups #1439

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

swick
Copy link
Contributor

@swick swick commented Sep 23, 2024

No description provided.

In the error case, we will clear the GVariant and then try to emit a
response from a NULL pointer as result. Always create an empty vardict
when we something failed instead.

This also clears the error because we continue on in the error case and
might re-use it. We do in fact re-use it in one case which is a
programmer error.
By g_variant_ref_sink'ing floating GVariants as early as possible. This
fixes a few cases where the variant would be leaked, where the floating
ref would be owned by a g_autoptr and makes it easier to see who owns
the reference.

Cases where the floating ref is passed into a function which immediately
sinks the floating ref are left untouched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

1 participant