diff --git a/libnm-glib/nm-remote-connection.c b/libnm-glib/nm-remote-connection.c index a03a44bf42..73a2cc83ef 100644 --- a/libnm-glib/nm-remote-connection.c +++ b/libnm-glib/nm-remote-connection.c @@ -137,12 +137,14 @@ result_cb (DBusGProxy *proxy, DBusGProxyCall *proxy_call, gpointer user_data) RemoteCall *call = user_data; NMRemoteConnectionResultFunc func = (NMRemoteConnectionResultFunc) call->callback; GError *error = NULL; + NMRemoteConnection *self = g_object_ref (call->self); dbus_g_proxy_end_call (proxy, proxy_call, &error, G_TYPE_INVALID); if (func) (*func) (call->self, error, call->user_data); g_clear_error (&error); remote_call_complete (call->self, call); + g_object_unref (self); } /**