plug memory leaks when OPEN_OLD_IDS is used with Maildir

amends 77acc268.
This commit is contained in:
Oswald Buddenhagen 2022-01-06 15:08:57 +01:00
parent 259132b7e7
commit 9c2cd0abd8

View File

@ -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 );
}
}