[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-242-gc1de20451
wwp at claws-mail.org
wwp at claws-mail.org
Tue Sep 28 14:09:57 CEST 2021
The branch, gtk3 has been updated
via c1de20451a1983aa3b9979464046933a88f79124 (commit)
from e29192eca47234ed93e63d6473eb92a3739781f7 (commit)
Summary of changes:
src/plugins/tnef_parse/tnef_parse.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit c1de20451a1983aa3b9979464046933a88f79124
Author: wwp <subscript at free.fr>
Date: Tue Sep 28 14:09:28 2021 +0200
Fix CID 1491121: resource leak.
diff --git a/src/plugins/tnef_parse/tnef_parse.c b/src/plugins/tnef_parse/tnef_parse.c
index b2ccdef41..90aaf1597 100644
--- a/src/plugins/tnef_parse/tnef_parse.c
+++ b/src/plugins/tnef_parse/tnef_parse.c
@@ -97,7 +97,6 @@ static MimeInfo *tnef_dump_file(const gchar *filename, char *data, size_t size)
gchar *tmpfilename = NULL;
FILE *fp = get_tmpfile_in_dir(get_mime_tmp_dir(), &tmpfilename);
GStatBuf statbuf;
- gchar *content_type = NULL;
if (!fp) {
g_free(tmpfilename);
return NULL;
@@ -109,6 +108,8 @@ static MimeInfo *tnef_dump_file(const gchar *filename, char *data, size_t size)
sub_info->subtype = g_strdup("octet-stream");
if (filename) {
+ gchar *content_type = NULL;
+
g_hash_table_insert(sub_info->typeparameters,
g_strdup("filename"),
g_strdup(filename));
@@ -119,8 +120,9 @@ static MimeInfo *tnef_dump_file(const gchar *filename, char *data, size_t size)
sub_info->subtype = g_strdup(strchr(content_type, '/')+1);
*(strchr(content_type, '/')) = '\0';
sub_info->type = procmime_get_media_type(content_type);
- g_free(content_type);
}
+ if (content_type)
+ g_free(content_type);
}
if (claws_fwrite(data, 1, size, fp) < size) {
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list