From 1a3b70bbe58355684cf896449fd0405fc05fdc2b Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 2 Oct 2024 12:03:01 +0200 Subject: button: Don't leak DBus proxy on successful logind lid handling --- src/gpm-button.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gpm-button.c b/src/gpm-button.c index 5bfe19d..c440c5b 100644 --- a/src/gpm-button.c +++ b/src/gpm-button.c @@ -284,6 +284,7 @@ gpm_button_is_lid_closed (GpmButton *button) NULL, &error ); + g_object_unref(proxy); if (error == NULL && res != NULL) { g_variant_get(res, "(v)", &inner ); lid = g_variant_get_boolean(inner); @@ -294,7 +295,6 @@ gpm_button_is_lid_closed (GpmButton *button) g_error ("Error in dbus - %s", error->message); g_error_free (error); } - g_object_unref(proxy); return FALSE; } -- cgit v1.2.1