talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 0c35d74035d32b7486a044609aa3d3b1ff877e3f
parent 68a5fe8e484c636ed13a4e885139af701d1f1adb
Author: wwp <subscript@free.fr>
Date:   Thu, 30 Sep 2021 11:35:42 +0200

Fix CID 1491272, 1491265, 1491237 and 1491176: resource leaks.

Diffstat:
Msrc/common/utils.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/common/utils.c b/src/common/utils.c @@ -1553,6 +1553,8 @@ gint scan_mailto_url(const gchar *mailto, gchar **from, gchar **to, gchar **cc, my_att[num_attach] = NULL; *attach = my_att; } + else + g_free(my_att); } else if (inreplyto && !*inreplyto && !g_ascii_strcasecmp(field, "in-reply-to")) { *inreplyto = decode_uri_gdup(value); @@ -2384,6 +2386,7 @@ gint remove_dir_recursive(const gchar *dir) if ((ret = remove_dir_recursive(dir_name)) < 0) { g_warning("can't remove directory: %s", dir_name); + g_dir_close(dp); return ret; } } else { @@ -4022,6 +4025,7 @@ void mailcap_update_default(const gchar *type, const gchar *command) else { if(claws_fputs(buf, outfp) == EOF) { err = TRUE; + g_strfreev(parts); break; } } @@ -4540,6 +4544,7 @@ static GSList *cm_split_path(const gchar *filename, int depth) else if (!strcmp(path_parts[i], "..")) { if (i == 0) { errno =ENOTDIR; + g_strfreev(path_parts); return NULL; } else /* Remove the last inserted element */