Browse Source

plug memory leaks when OPEN_OLD_IDS is used with Maildir

amends 77acc268.
wip/maildir-path-under-inbox
Oswald Buddenhagen 3 years ago
parent
commit
9c2cd0abd8
  1. 5
      src/drv_maildir.c

5
src/drv_maildir.c

@ -269,6 +269,7 @@ free_maildir_messages( maildir_message_t *msg )
for (maildir_message_t *tmsg; (tmsg = msg); msg = tmsg) { for (maildir_message_t *tmsg; (tmsg = msg); msg = tmsg) {
tmsg = msg->next; tmsg = msg->next;
free( msg->base ); free( msg->base );
free( msg->msgid );
free( msg ); free( msg );
} }
} }
@ -552,8 +553,10 @@ maildir_free_scan( msg_t_array_alloc_t *msglist )
uint i; uint i;
if (msglist->array.data) { 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].base );
free( msglist->array.data[i].msgid );
}
free( msglist->array.data ); free( msglist->array.data );
} }
} }

Loading…
Cancel
Save