commit 2fbcc0fceff9abe6fa4141656f25d9ec5d636d9c
parent c5b631cdb8e99c246c99c653e57f89a95e722e58
Author: wwp <wwp@free.fr>
Date: Mon, 16 Jan 2017 11:03:35 +0100
Fix another (not so big but still common) leak, thanks to valgrind.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/mh.c b/src/mh.c
@@ -732,9 +732,12 @@ static gboolean mh_is_msg_changed(Folder *folder, FolderItem *item,
{
GStatBuf s;
gchar *path;
+ gchar *parent_path;
- path = g_strdup_printf("%s%c%d", folder_item_get_path(item),
+ parent_path = folder_item_get_path(item);
+ path = g_strdup_printf("%s%c%d", parent_path,
G_DIR_SEPARATOR, msginfo->msgnum);
+ g_free(parent_path);
if (g_stat((path), &s) < 0 ||
msginfo->size != s.st_size || (
(msginfo->mtime - s.st_mtime != 0) &&