summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/gdm-common.c6
-rw-r--r--daemon/gdm-manager.c2
2 files changed, 3 insertions, 5 deletions
diff --git a/common/gdm-common.c b/common/gdm-common.c
index d807c019..9683d557 100644
--- a/common/gdm-common.c
+++ b/common/gdm-common.c
@@ -383,7 +383,7 @@ gdm_activate_session_by_id (GDBusConnection *connection,
gboolean
gdm_get_login_window_session_id (const char *seat_id,
- char **session_id)
+ char **session_id)
{
gboolean ret;
int res, i;
@@ -408,10 +408,8 @@ gdm_get_login_window_session_id (const char *seat_id,
res = sd_session_get_class (sessions[i], &service_class);
if (res < 0) {
- if (res == -ENOENT) {
- free (service_class);
+ if (res == -ENOENT)
continue;
- }
g_debug ("failed to determine class of session %s: %s", sessions[i], strerror (-res));
ret = FALSE;
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index f6684a8b..b52512d2 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -2143,7 +2143,7 @@ create_user_session_for_display (GdmManager *manager,
char *display_seat_id = NULL;
char *display_id = NULL;
#if defined(ENABLE_WAYLAND_SUPPORT) && defined(ENABLE_USER_DISPLAY_SERVER)
- char *display_session_type = NULL;
+ g_autofree char *display_session_type = NULL;
gboolean greeter_is_wayland;
#endif