From de008aa637dd1ba5b9efbd4db4492927f3799327 Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Sun, 1 May 2022 18:16:44 +0200 Subject: [PATCH] session: Fix broken session id handling Also fixes a minor memory leak. --- src/session.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/session.c b/src/session.c index 6da70520..4db61eda 100644 --- a/src/session.c +++ b/src/session.c @@ -355,8 +355,6 @@ ice_init(void) callbacks.save_complete.client_data = callbacks.shutdown_cancelled.client_data = (SmPointer) NULL; - client_id = Estrdup(sm_client_id); - error_string_ret[0] = '\0'; sm_conn = @@ -364,8 +362,9 @@ ice_init(void) SmcSaveYourselfProcMask | SmcDieProcMask | SmcSaveCompleteProcMask | SmcShutdownCancelledProcMask, &callbacks, - client_id, &sm_client_id, 4096, error_string_ret); - Efree(client_id); + sm_client_id, &client_id, 4096, error_string_ret); + + EFREE_SET(sm_client_id, client_id); if (error_string_ret[0]) Eprintf("While connecting to session manager: %s.", error_string_ret);