diff options
author | Richard Hughes <richard@hughsie.com> | 2012-01-20 17:21:22 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2012-01-20 17:21:22 +0000 |
commit | c10bb1a21dff310d65d59187b49b88bc3288f988 (patch) | |
tree | dd38f73031b3990df1a2342a408ff1b7c87bf5fa /lib | |
parent | c2514488db6ed18d0f16d9f77ee1b785a4f42ca8 (diff) |
Fix a critical warning in gnome-settings-daemon when setting the proxy
We have to ref the floating reference if we want to unref it in _finish().
Diffstat (limited to 'lib')
-rw-r--r-- | lib/packagekit-glib2/pk-control.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/packagekit-glib2/pk-control.c b/lib/packagekit-glib2/pk-control.c index 6676c4a7..e205dcbc 100644 --- a/lib/packagekit-glib2/pk-control.c +++ b/lib/packagekit-glib2/pk-control.c @@ -1181,6 +1181,7 @@ pk_control_set_proxy2_async (PkControl *control, proxy_socks ? proxy_socks : "", no_proxy ? no_proxy : "", pac ? pac : ""); + g_variant_ref_sink (state->parameters); if (cancellable != NULL) state->cancellable = g_object_ref (cancellable); @@ -1426,6 +1427,7 @@ pk_control_set_root_async (PkControl *control, state->res = g_object_ref (res); state->control = g_object_ref (control); state->parameters = g_variant_new ("(s)", root ? root : ""); + g_variant_ref_sink (state->parameters); if (cancellable != NULL) state->cancellable = g_object_ref (cancellable); @@ -1862,6 +1864,7 @@ pk_control_get_time_since_action_async (PkControl *control, state->res = g_object_ref (res); state->control = g_object_ref (control); state->parameters = g_variant_new ("(s)", pk_role_enum_to_string (role)); + g_variant_ref_sink (state->parameters); if (cancellable != NULL) state->cancellable = g_object_ref (cancellable); @@ -2081,6 +2084,7 @@ pk_control_can_authorize_async (PkControl *control, state->res = g_object_ref (res); state->control = g_object_ref (control); state->parameters = g_variant_new ("(s)", action_id); + g_variant_ref_sink (state->parameters); if (cancellable != NULL) state->cancellable = g_object_ref (cancellable); |