[Commits] [SCM] claws branch, master, updated. 3.18.0-197-g144f19e9a

wwp at claws-mail.org wwp at claws-mail.org
Tue Sep 28 17:41:11 CEST 2021


The branch, master has been updated
       via  144f19e9a89f162c5c1404de042923e29b44fa4d (commit)
      from  b589f44bbd4acb683c6b2c826e42823efbe24632 (commit)

Summary of changes:
 src/plugins/pgpcore/sgpgme.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 144f19e9a89f162c5c1404de042923e29b44fa4d
Author: wwp <subscript at free.fr>
Date:   Tue Sep 28 17:41:01 2021 +0200

    Fix CID 1492251: resource leaks.

diff --git a/src/plugins/pgpcore/sgpgme.c b/src/plugins/pgpcore/sgpgme.c
index 4540f4ed6..f9c03221f 100644
--- a/src/plugins/pgpcore/sgpgme.c
+++ b/src/plugins/pgpcore/sgpgme.c
@@ -559,11 +559,13 @@ gchar *sgpgme_get_encrypt_data(GSList *recp_names, gpgme_protocol_t proto)
 		gchar *fpr = skey->fpr;
 		gchar *tmp = NULL;
 		debug_print("adding %s\n", fpr);
-		tmp = g_strconcat(ret?ret:"", fpr, " ", NULL);
-		g_free(ret);
+		tmp = g_strconcat(ret ? ret : "", fpr, " ", NULL);
+		if (ret)
+			g_free(ret);
 		ret = tmp;
 		i++;
 	}
+	g_free(kset);
 	return ret;
 }
 

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list