[gdm] session: clean up error handling in on_setup_complete_cb
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] session: clean up error handling in on_setup_complete_cb
- Date: Mon, 17 Dec 2012 20:27:05 +0000 (UTC)
commit 7116ae52d114be5ad19d8b3f69e159b3350b06a8
Author: Ray Strode <rstrode redhat com>
Date: Mon Dec 17 10:29:48 2012 -0500
session: clean up error handling in on_setup_complete_cb
If there is an error with setup then we'll pass that
error on to the setup return call, free it, and then also
try to use it later.
Also, if there is error, we'll try to unref a NULL GVariant.
This commit fixes those problems in error handling.
daemon/gdm-session.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 332e71b..87bf74f 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -1911,13 +1911,14 @@ on_setup_complete_cb (GdmDBusWorker *proxy,
service_name);
gdm_session_authenticate (self, service_name);
+ g_variant_unref (ret);
} else {
- g_dbus_method_invocation_take_error (conversation->starting_invocation, error);
+ g_dbus_method_invocation_return_gerror (conversation->starting_invocation, error);
report_and_stop_conversation (self, service_name, error);
+ g_error_free (error);
}
- g_variant_unref (ret);
g_clear_object (&conversation->starting_invocation);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]