[gnome-session] gnome-session-quit: Fix extra unref when power off is cancelled
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] gnome-session-quit: Fix extra unref when power off is cancelled
- Date: Sun, 27 Dec 2015 20:25:01 +0000 (UTC)
commit 99ff5bb6685f344fae92696602e8663aca9755b6
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Sun Dec 27 14:23:09 2015 -0600
gnome-session-quit: Fix extra unref when power off is cancelled
GLib-CRITICAL **: g_variant_unref: assertion 'value != NULL' failed
The logout code already accounted for this, but it was missed for power
off.
tools/gnome-session-quit.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tools/gnome-session-quit.c b/tools/gnome-session-quit.c
index 2873ccc..3901d75 100644
--- a/tools/gnome-session-quit.c
+++ b/tools/gnome-session-quit.c
@@ -157,9 +157,9 @@ do_power_off (const char *action)
g_warning ("Failed to call %s: %s",
action, error->message);
g_error_free (error);
+ } else {
+ g_variant_unref (reply);
}
-
- g_variant_unref (reply);
g_clear_object (&sm_proxy);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]