Skip to content

Commit

Permalink
lib-storage: Fix memory leak when search accessed headers but found n…
Browse files Browse the repository at this point in the history
…o mails

For example fetching headers with UID FETCH for a nonexistent UID.
  • Loading branch information
sirainen committed Mar 2, 2018
1 parent caf4c4b commit 293f69e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib-storage/index/index-mail.c
Expand Up @@ -2081,6 +2081,7 @@ void index_mail_free(struct mail *_mail)
if (array_is_created(&mail->header_match_lines))
array_free(&mail->header_match_lines);

mailbox_header_lookup_unref(&mail->data.wanted_headers);
mailbox_header_lookup_unref(&mail->mail.wanted_headers);
event_unref(&_mail->event);
pool_unref(&mail->mail.data_pool);
Expand Down

0 comments on commit 293f69e

Please sign in to comment.