[gdm] Unref async results after calling g_simple_async_result_complete_in_idle()
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] Unref async results after calling g_simple_async_result_complete_in_idle()
- Date: Thu, 9 Oct 2014 19:17:17 +0000 (UTC)
commit f303808807a9774fbd3693806f3c546dd517f6ea
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Thu Oct 9 12:24:41 2014 -0400
Unref async results after calling g_simple_async_result_complete_in_idle()
All async results were leaked, since g_simple_async_result_complete_in_idle()
takes a new reference rather than assuming the ref passed in.
https://bugzilla.gnome.org/show_bug.cgi?id=738246
libgdm/gdm-client.c | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/libgdm/gdm-client.c b/libgdm/gdm-client.c
index 3cd298e..b802034 100644
--- a/libgdm/gdm-client.c
+++ b/libgdm/gdm-client.c
@@ -104,6 +104,7 @@ on_got_manager (GdmManager *manager,
}
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
}
static void
@@ -126,6 +127,7 @@ get_manager (GdmClient *client,
(GDestroyNotify)
g_object_unref);
g_simple_async_result_complete_in_idle (result);
+ g_object_unref (result);
return;
}
@@ -151,6 +153,7 @@ on_user_verifier_proxy_created (GObject *source,
if (user_verifier == NULL) {
g_simple_async_result_take_error (operation_result, error);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -161,6 +164,7 @@ on_user_verifier_proxy_created (GObject *source,
(GDestroyNotify)
g_object_unref);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
}
static void
@@ -175,6 +179,7 @@ on_reauthentication_channel_connected (GDBusConnection *connection,
if (!g_dbus_connection_new_for_address_finish (result, &error)) {
g_simple_async_result_take_error (operation_result, error);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -205,6 +210,7 @@ on_reauthentication_channel_opened (GdmManager *manager,
&error)) {
g_simple_async_result_take_error (operation_result, error);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -232,6 +238,7 @@ on_got_manager_for_reauthentication (GdmClient *client,
&error)) {
g_simple_async_result_take_error (operation_result, error);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -314,6 +321,7 @@ on_connected (GDBusConnection *connection,
&error)) {
g_simple_async_result_take_error (operation_result, error);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -322,6 +330,7 @@ on_connected (GDBusConnection *connection,
(GDestroyNotify)
g_object_unref);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
}
static void
@@ -342,6 +351,7 @@ on_session_opened (GdmManager *manager,
&error)) {
g_simple_async_result_take_error (operation_result, error);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -368,6 +378,7 @@ on_got_manager_for_opening_connection (GdmClient *client,
&error)) {
g_simple_async_result_take_error (operation_result, error);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -446,6 +457,7 @@ gdm_client_open_connection (GdmClient *client,
(GDestroyNotify)
g_object_unref);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -685,6 +697,7 @@ on_connection_opened_for_user_verifier (GdmClient *client,
if (!gdm_client_open_connection_finish (client, result, &error)) {
g_simple_async_result_take_error (operation_result, error);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -735,6 +748,7 @@ gdm_client_get_user_verifier (GdmClient *client,
(GDestroyNotify)
g_object_unref);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -825,6 +839,7 @@ on_greeter_proxy_created (GObject *source,
if (greeter == NULL) {
g_simple_async_result_take_error (operation_result, error);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -833,6 +848,7 @@ on_greeter_proxy_created (GObject *source,
(GDestroyNotify)
g_object_unref);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
query_for_timed_login_requested_signal (greeter);
}
@@ -849,6 +865,7 @@ on_connection_opened_for_greeter (GdmClient *client,
if (!gdm_client_open_connection_finish (client, result, &error)) {
g_simple_async_result_take_error (operation_result, error);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -899,6 +916,7 @@ gdm_client_get_greeter (GdmClient *client,
(GDestroyNotify)
g_object_unref);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -1021,6 +1039,7 @@ on_remote_greeter_proxy_created (GObject *object,
if (remote_greeter == NULL) {
g_simple_async_result_take_error (operation_result, error);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -1029,6 +1048,7 @@ on_remote_greeter_proxy_created (GObject *object,
(GDestroyNotify)
g_object_unref);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
}
static void
@@ -1043,6 +1063,7 @@ on_connection_opened_for_remote_greeter (GdmClient *client,
if (!gdm_client_open_connection_finish (client, result, &error)) {
g_simple_async_result_take_error (operation_result, error);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -1093,6 +1114,7 @@ gdm_client_get_remote_greeter (GdmClient *client,
(GDestroyNotify)
g_object_unref);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -1212,6 +1234,7 @@ on_chooser_proxy_created (GObject *source,
if (chooser == NULL) {
g_simple_async_result_take_error (operation_result, error);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -1220,6 +1243,7 @@ on_chooser_proxy_created (GObject *source,
(GDestroyNotify)
g_object_unref);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
}
static void
@@ -1234,6 +1258,7 @@ on_connection_opened_for_chooser (GdmClient *client,
if (!gdm_client_open_connection_finish (client, result, &error)) {
g_simple_async_result_take_error (operation_result, error);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
@@ -1284,6 +1309,7 @@ gdm_client_get_chooser (GdmClient *client,
(GDestroyNotify)
g_object_unref);
g_simple_async_result_complete_in_idle (operation_result);
+ g_object_unref (operation_result);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]