summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2018-08-30 13:04:56 -0400
committerRay Strode <halfline@gmail.com>2018-08-31 20:27:11 +0000
commitc0c62e4c01a2c5481c537d57fd0c12ab067fb4b5 (patch)
tree7708b3eb972c11b4696c64133cd1695d113d3d0a /common
parent8d4ee62624fe54cbf2c6fcd69372bf487d8de3d3 (diff)
downloadgdm-c0c62e4c01a2c5481c537d57fd0c12ab067fb4b5.tar.gz
common: remove unnecessary free
This commit drops an erroneous free call, that would potentially free a dangling pointer. Luckily the error condition can never occur because the error code checked is never returned, so the free call is dead code. This commit removes the free call. A subsequent commit will fix the error code checking.
Diffstat (limited to 'common')
-rw-r--r--common/gdm-common.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/common/gdm-common.c b/common/gdm-common.c
index 871f9bfc..9683d557 100644
--- a/common/gdm-common.c
+++ b/common/gdm-common.c
@@ -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;