[gdm/rhel-7.9: 8/51] manager: plug leak in maybe_activate_other_session
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/rhel-7.9: 8/51] manager: plug leak in maybe_activate_other_session
- Date: Mon, 12 Apr 2021 20:58:09 +0000 (UTC)
commit 0ee00c3abfc418a9fef3a6511b910e7b61ce45c6
Author: Ray Strode <rstrode redhat com>
Date: Fri Jun 22 14:44:11 2018 -0400
manager: plug leak in maybe_activate_other_session
The function asks logind what the currently active session is on the
given seat. It then leaks the response.
This commit plugs the leak.
daemon/gdm-manager.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 7539acf11..129cc0de4 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1421,7 +1421,7 @@ maybe_activate_other_session (GdmManager *self,
GdmDisplay *old_display)
{
char *seat_id = NULL;
- char *session_id;
+ char *session_id = NULL;
int ret;
g_object_get (G_OBJECT (old_display),
@@ -1440,6 +1440,8 @@ maybe_activate_other_session (GdmManager *self,
if (display == NULL) {
activate_login_window_session_on_seat (self, seat_id);
}
+
+ g_free (session_id);
}
g_free (seat_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]