commit 126c9d80cee8f0f7f4559115f26f9891bd966d67
parent 87ec96c5974945425d1151da7f6f152ac963e070
Author: Andrej Kacian <ticho@claws-mail.org>
Date: Wed, 10 Feb 2016 18:30:20 +0100
Fix a segfault caused by freeing a string on incorrect place.
Closes bug #3616.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mh.c b/src/mh.c
@@ -272,11 +272,12 @@ static void mh_get_last_num(Folder *folder, FolderItem *item)
if (max < num)
max = num;
}
+ g_free(fullpath);
+
if (num % 2000 == 0)
GTK_EVENTS_FLUSH();
}
g_dir_close(dp);
- g_free(fullpath);
g_free(path);
debug_print("Last number in dir %s = %d\n", item->path?item->path:"(null)", max);