From b1d0c15ff521d50e8e28ddf189c0de434328bb43 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Thu, 31 Mar 2016 20:47:52 +1000 Subject: [PATCH] Fix for Mail Crash --- mail_menu.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mail_menu.c b/mail_menu.c index f7b3b70..5ca8ef1 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -1211,17 +1211,18 @@ int mail_menu(int socket, struct user_record *user) { read_message(socket, user, msghs, z); } } - } + } + if (closed == 0) { + JAM_CloseMB(jb); + } + if (msghs != NULL) { + free_message_headers(msghs); + } } else { s_putstring(socket, "\r\nThere is no mail in this area\r\n"); } } - if (closed == 0) { - JAM_CloseMB(jb); - } - if (msghs != NULL) { - free_message_headers(msghs); - } + break; case 'c': {