[Commits] [SCM] claws branch, master, updated. 3.18.0-131-g758724012

wwp at claws-mail.org wwp at claws-mail.org
Tue Sep 14 13:58:19 CEST 2021


The branch, master has been updated
       via  7587240124edf121c3b1f450f0a9d33d2741223c (commit)
      from  03066f1d7ce736a062f2a0d387ea9a70dc35b9c2 (commit)

Summary of changes:
 src/action.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 7587240124edf121c3b1f450f0a9d33d2741223c
Author: wwp <subscript at free.fr>
Date:   Tue Sep 14 13:57:43 2021 +0200

    Fix CID 1491213: resource leak.

diff --git a/src/action.c b/src/action.c
index 8d22599c8..84a3d2da0 100644
--- a/src/action.c
+++ b/src/action.c
@@ -959,9 +959,12 @@ static ChildInfo *fork_child(gchar *cmd, const gchar *msg_str,
 	ret_str = g_locale_from_utf8(cmd, strlen(cmd),
 				     &by_read, &by_written,
 				     NULL);
-	if (!ret_str || !by_written)
+	if (!ret_str || !by_written) {
+		if (ret_str)
+			g_free(ret_str);
 		ret_str = g_strdup(cmd);
-
+	}
+    
 	trim_cmd = ret_str;
 
 	while (g_ascii_isspace(trim_cmd[0]))

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list