From 9c2cd0abd84a5049e01efab1f5ba6983922e91f2 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 6 Jan 2022 15:08:57 +0100 Subject: [PATCH] plug memory leaks when OPEN_OLD_IDS is used with Maildir amends 77acc268. --- src/drv_maildir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/drv_maildir.c b/src/drv_maildir.c index f916632..4082fb7 100644 --- a/src/drv_maildir.c +++ b/src/drv_maildir.c @@ -269,6 +269,7 @@ free_maildir_messages( maildir_message_t *msg ) for (maildir_message_t *tmsg; (tmsg = msg); msg = tmsg) { tmsg = msg->next; free( msg->base ); + free( msg->msgid ); free( msg ); } } @@ -552,8 +553,10 @@ maildir_free_scan( msg_t_array_alloc_t *msglist ) uint i; if (msglist->array.data) { - for (i = 0; i < msglist->array.size; i++) + for (i = 0; i < msglist->array.size; i++) { free( msglist->array.data[i].base ); + free( msglist->array.data[i].msgid ); + } free( msglist->array.data ); } }