kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=de008aa637dd1ba5b9efbd4db4492927f3799327

commit de008aa637dd1ba5b9efbd4db4492927f3799327
Author: Kim Woelders <[email protected]>
Date:   Sun May 1 18:16:44 2022 +0200

    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);

-- 


Reply via email to