summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2015-04-10 16:19:50 +0200
committerLubomir Rintel <lkundrak@v3.sk>2015-04-17 13:03:03 +0200
commit9d3b31e1aee712094c7df582beb548580daa18cb (patch)
tree9b7107e00b5501c35ee60767c1b6b0b44e84d287
parentb97a45957fd756b34397f8b0a0659e097f27ca3c (diff)
downloadNetworkManager-9d3b31e1aee712094c7df582beb548580daa18cb.tar.gz
nm-remote-connection: take a reference to self while calling get_settings
(process:6888): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GDBusProxy' Program received signal SIGTRAP, Trace/breakpoint trap. g_logv (log_domain=0x3149a3b224 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fffffffda70) at gmessages.c:1046 1046 g_private_set (&g_log_depth, GUINT_TO_POINTER (depth)); (gdb) bt #0 0x0000003148e50c70 in g_logv (log_domain=0x3149a3b224 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fffffffda70) at gmessages.c:1046 #1 0x0000003148e50eaf in g_log (log_domain=log_domain@entry=0x3149a3b224 "GLib-GObject", log_level=log_level@entry=G_LOG_LEVEL_WARNING, format=format@entry=0x3149a42690 "invalid unclassed pointer in cast to '%s'") at gmessages.c:1079 #2 0x0000003149a34171 in g_type_check_instance_cast (type_instance=type_instance@entry=0x6fc530, iface_type=<optimized out>) at gtype.c:4030 #3 0x00007ffff7d6b016 in nmdbus_settings_connection_call_get_settings_finish (proxy=0x6fc530, out_settings=out_settings@entry=0x7fffffffdbb8, res=res@entry=0x6fe150, error=error@entry=0x0) at nmdbus-settings-connection.c:1303 #4 0x00007ffff7ce8813 in updated_get_settings_cb (proxy=<optimized out>, result=0x6fe150, user_data=user_data@entry=0x6fc650) at nm-remote-connection.c:588 #5 0x000000314a27640d in g_simple_async_result_complete (simple=0x6fe150 [GSimpleAsyncResult]) at gsimpleasyncresult.c:763 #6 0x000000314a2df47c in reply_cb (connection=<optimized out>, res=0x6fe0e0, user_data=user_data@entry=0x6fe150) at gdbusproxy.c:2623 #7 0x000000314a27640d in g_simple_async_result_complete (simple=0x6fe0e0 [GSimpleAsyncResult]) at gsimpleasyncresult.c:763 #8 0x000000314a2d48cc in g_dbus_connection_call_done (source=<optimized out>, result=<optimized out>, user_data=user_data@entry=0x7fffec01a320) at gdbusconnection.c:5502 #9 0x000000314a27640d in g_simple_async_result_complete (simple=0x6e5f40 [GSimpleAsyncResult]) at gsimpleasyncresult.c:763 #10 0x000000314a27647c in complete_in_idle_cb (data=0x6e5f40) at gsimpleasyncresult.c:775 #11 0x0000003148e49b6b in g_main_context_dispatch (context=0x687970) at gmain.c:3064 #12 0x0000003148e49b6b in g_main_context_dispatch (context=context@entry=0x687970) at gmain.c:3663 #13 0x0000003148e49f08 in g_main_context_iterate (context=0x687970, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3734 #14 0x0000003148e4a232 in g_main_loop_run (loop=0x687a80) at gmain.c:3928 #15 0x00000000004136a1 in main (argc=<optimized out>, argv=<optimized out>) at nmcli.c:632 (gdb)
-rw-r--r--libnm/nm-remote-connection.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libnm/nm-remote-connection.c b/libnm/nm-remote-connection.c
index 3afe7f8eb9..98924973d7 100644
--- a/libnm/nm-remote-connection.c
+++ b/libnm/nm-remote-connection.c
@@ -602,6 +602,8 @@ updated_get_settings_cb (GObject *proxy,
priv->visible = visible;
g_object_notify (G_OBJECT (self), NM_REMOTE_CONNECTION_VISIBLE);
}
+
+ g_object_unref (self);
}
static void
@@ -613,7 +615,8 @@ updated_cb (NMDBusSettingsConnection *proxy, gpointer user_data)
/* The connection got updated; request the replacement settings */
nmdbus_settings_connection_call_get_settings (priv->proxy,
NULL,
- updated_get_settings_cb, self);
+ updated_get_settings_cb,
+ g_object_ref (self));
}
/****************************************************************/