[Commits] [SCM] claws branch, master, updated. 4.2.0-90-g59d1aa181
paul at claws-mail.org
paul at claws-mail.org
Tue Apr 23 08:20:24 UTC 2024
The branch, master has been updated
via 59d1aa181639275f8bd221d8e105b29b5b1fadba (commit)
from e7e6d98b71b44c060cd0ec5f62fb8db5dd67b83a (commit)
Summary of changes:
src/compose.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 59d1aa181639275f8bd221d8e105b29b5b1fadba
Author: Paul <paul at claws-mail.org>
Date: Tue Apr 23 09:20:18 2024 +0100
fix CID 1596595: Resource leaks, and CID 1596594: (CHECKED_RETURN)
diff --git a/src/compose.c b/src/compose.c
index cedd1cab0..ca8530ffe 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -11004,13 +11004,16 @@ int attach_image(Compose *compose, GtkSelectionData *data, const gchar *subtype)
if ((fp = claws_fopen(file, "wb")) == NULL) {
FILE_OP_ERROR(file, "claws_fopen");
+ g_free(file);
return -1;
}
if (claws_fwrite(contents, 1, len, fp) != len) {
FILE_OP_ERROR(file, "claws_fwrite");
claws_fclose(fp);
- claws_unlink(file);
+ if (claws_unlink(file) < 0)
+ FILE_OP_ERROR(file, "unlink");
+ g_free(file);
return -1;
}
@@ -11018,7 +11021,9 @@ int attach_image(Compose *compose, GtkSelectionData *data, const gchar *subtype)
if (r == EOF) {
FILE_OP_ERROR(file, "claws_fclose");
- claws_unlink(file);
+ if (claws_unlink(file) < 0)
+ FILE_OP_ERROR(file, "unlink");
+ g_free(file);
return -1;
}
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list