[Commits] [SCM] claws branch, master, updated. 4.2.0-111-g0a7dc16bb

mones at claws-mail.org mones at claws-mail.org
Sun Jun 9 09:00:35 UTC 2024


The branch, master has been updated
       via  0a7dc16bb5fb197adf58032a5899a4021c48dea0 (commit)
      from  94fd0bbfab005b65eeef1167e43b05d735b53d7b (commit)

Summary of changes:
 src/compose.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit 0a7dc16bb5fb197adf58032a5899a4021c48dea0
Author: Ricardo Mones <ricardo at mones.org>
Date:   Sun Jun 9 10:59:23 2024 +0200

    Fix CID 1596595: Resource leak

diff --git a/src/compose.c b/src/compose.c
index 184a2d81f..9953207ad 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -11002,6 +11002,7 @@ int attach_image(Compose *compose, GtkSelectionData *data, const gchar *subtype)
 {
 	FILE *fp;
 	const guchar *contents;
+	gchar *tmpf;
 	gchar *file;
 	gchar *type;
 	size_t len;
@@ -11012,7 +11013,9 @@ int attach_image(Compose *compose, GtkSelectionData *data, const gchar *subtype)
 	contents = gtk_selection_data_get_data(data);
 	len = gtk_selection_data_get_length(data);
 
-	file = g_strconcat(get_tmp_file(), "-image.", subtype, NULL);
+	tmpf = get_tmp_file();
+	file = g_strconcat(tmpf, "-image.", subtype, NULL);
+	g_free(tmpf);
 
 	debug_print("writing image to %s\n", file);
 

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list