[Commits] [SCM] claws branch, master, updated. 3.17.3-164-g38ba9f7

ticho at claws-mail.org ticho at claws-mail.org
Thu Apr 25 23:50:25 CEST 2019


The branch, master has been updated
       via  38ba9f7dbab330968e841d3a44b0cfab9d02a5b8 (commit)
      from  969c422ede326adee17bf5009a0c55c687ef1f6f (commit)

Summary of changes:
 src/main.c |   10 ++++++++++
 1 file changed, 10 insertions(+)


- Log -----------------------------------------------------------------
commit 38ba9f7dbab330968e841d3a44b0cfab9d02a5b8
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Thu Apr 25 23:49:47 2019 +0200

    Fix a memory leak in sc_session_manager_connect()

diff --git a/src/main.c b/src/main.c
index 518ea75..87b2c56 100644
--- a/src/main.c
+++ b/src/main.c
@@ -641,6 +641,16 @@ static void sc_session_manager_connect(MainWindow *mainwin)
 				NULL, &client_id,
 				256, error_string_ret);
 
+		/* From https://www.x.org/releases/X11R7.7/doc/libSM/SMlib.txt:
+		 * If SmcOpenConnection succeeds, it returns an opaque connection
+		 * pointer of type SmcConn and the client_id_ret argument contains
+		 * the client ID to be used for this session. The client_id_ret
+		 * should be freed with a call to free when no longer needed. On
+		 * failure, SmcOpenConnection returns NULL, and the reason for
+		 * failure is returned in error_string_ret. */
+		if (mainwin->smc_conn != NULL)
+			g_free(client_id);
+
 		if (error_string_ret[0] || mainwin->smc_conn == NULL)
 			g_warning ("While connecting to session manager: %s.",
 				error_string_ret);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list