From: Andrej Kacian Date: Wed, 10 Feb 2016 17:30:20 +0000 (+0100) Subject: Fix a segfault caused by freeing a string on incorrect place. X-Git-Tag: 3.14.0~178 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=126c9d80cee8f0f7f4559115f26f9891bd966d67;ds=sidebyside Fix a segfault caused by freeing a string on incorrect place. Closes bug #3616. --- diff --git a/src/mh.c b/src/mh.c index b9036aa53..0736e58e0 100644 --- 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);