[network-manager-applet/bg/secrets-refcount] applet: fix reference count for secret request result
- From: Beniamino Galvani <bgalvani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/bg/secrets-refcount] applet: fix reference count for secret request result
- Date: Sat, 29 Feb 2020 17:18:25 +0000 (UTC)
commit e27ca5486a670b15c4a0e33698bf523b229bfb67
Author: Beniamino Galvani <bgalvani redhat com>
Date: Sat Feb 29 18:02:50 2020 +0100
applet: fix reference count for secret request result
Don't pass a floating variant to the callback function but convert it
into a full one so that we can guarantee that the callback function
will not assume ownership.
(nm-applet:691510): GLib-CRITICAL **: 18:02:29.581: g_atomic_ref_count_dec: assertion 'g_atomic_int_get
(arc) > 0' failed
_g_log_abort () at /lib64/libglib-2.0.so.0
g_logv () at /lib64/libglib-2.0.so.0
g_log () at /lib64/libglib-2.0.so.0
g_atomic_ref_count_dec () at /lib64/libglib-2.0.so.0
g_variant_unref () at /lib64/libglib-2.0.so.0
gs_local_variant_unref (v=<synthetic pointer>) at ./shared/nm-utils/gsystem-local-alloc.h:73
complete_request (info=info@entry=0xaaf340) at src/applet-vpn-request.c:273
external_ui_from_child_response (error=0x7fffffffd380, info=<optimized out>) at
src/applet-vpn-request.c:261
process_child_response (info=<optimized out>) at src/applet-vpn-request.c:298
g_child_watch_dispatch () at /lib64/libglib-2.0.so.0
g_main_context_dispatch () at /lib64/libglib-2.0.so.0
...
src/applet-vpn-request.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/applet-vpn-request.c b/src/applet-vpn-request.c
index 07a71fce..91368f92 100644
--- a/src/applet-vpn-request.c
+++ b/src/applet-vpn-request.c
@@ -281,7 +281,7 @@ complete_request (VpnSecretsInfo *info)
g_variant_builder_add (&settings_builder, "{sa{sv}}",
NM_SETTING_VPN_SETTING_NAME,
&vpn_builder);
- settings = g_variant_builder_end (&settings_builder);
+ settings = g_variant_ref_sink (g_variant_builder_end (&settings_builder));
applet_secrets_request_complete (req, settings, NULL);
applet_secrets_request_free (req);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]