[network-manager-applet/NMA_0_8] bluetooth: fix crash detecting DUN the second time
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/NMA_0_8] bluetooth: fix crash detecting DUN the second time
- Date: Thu, 21 Apr 2011 18:15:46 +0000 (UTC)
commit 362b5f0cbdaeb097e1274c72c8e3716850019cec
Author: Dan Williams <dcbw redhat com>
Date: Thu Apr 21 13:16:12 2011 -0500
bluetooth: fix crash detecting DUN the second time
Some stuff wasn't getting cleaned up, and other stuff was
getting cleaned up at the wrong time.
src/gnome-bluetooth/bt-widget.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/gnome-bluetooth/bt-widget.c b/src/gnome-bluetooth/bt-widget.c
index b7b2d7f..1201bb4 100644
--- a/src/gnome-bluetooth/bt-widget.c
+++ b/src/gnome-bluetooth/bt-widget.c
@@ -263,6 +263,11 @@ dun_cleanup (PluginInfo *info, const char *message, gboolean uncheck)
g_slist_free (info->modem_proxies);
info->modem_proxies = NULL;
+ if (info->mm_proxy) {
+ g_object_unref (info->mm_proxy);
+ info->mm_proxy = NULL;
+ }
+
if (info->dun_proxy) {
if (info->rfcomm_iface) {
dbus_g_proxy_call_no_reply (info->dun_proxy, "Disconnect",
@@ -280,11 +285,6 @@ dun_cleanup (PluginInfo *info, const char *message, gboolean uncheck)
g_free (info->rfcomm_iface);
info->rfcomm_iface = NULL;
- if (info->bus) {
- dbus_g_connection_unref (info->bus);
- info->bus = NULL;
- }
-
if (info->dun_timeout_id) {
g_source_remove (info->dun_timeout_id);
info->dun_timeout_id = 0;
@@ -884,6 +884,8 @@ plugin_info_destroy (gpointer data)
g_object_unref (info->settings);
g_object_unref (info->btmodel);
g_object_unref (info->btclient);
+ if (info->bus)
+ dbus_g_connection_unref (info->bus);
memset (info, 0, sizeof (PluginInfo));
g_free (info);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]