Mercurial > dovecot > core-2.2
changeset 10563:45f360c1c9eb HEAD
virtual: wanted_headers needs to be kept referenced.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 19 Jan 2010 16:52:19 +0200 |
parents | 57eb71a78375 |
children | 69c793c7f185 |
files | src/plugins/virtual/virtual-mail.c |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/virtual/virtual-mail.c Tue Jan 19 16:51:47 2010 +0200 +++ b/src/plugins/virtual/virtual-mail.c Tue Jan 19 16:52:19 2010 +0200 @@ -45,7 +45,11 @@ vmail->imail.trans = (struct index_transaction_context *)t; vmail->wanted_fields = wanted_fields; - vmail->wanted_headers = wanted_headers; + if (wanted_headers != NULL) { + vmail->wanted_headers = wanted_headers; + mailbox_header_lookup_ref(wanted_headers); + } + i_array_init(&vmail->backend_mails, array_count(&mbox->backend_boxes)); return &vmail->imail.mail.mail; } @@ -61,6 +65,9 @@ mail_free(&mails[i]); array_free(&vmail->backend_mails); + if (vmail->wanted_headers != NULL) + mailbox_header_lookup_unref(&vmail->wanted_headers); + pool_unref(&vmail->imail.data_pool); pool_unref(&vmail->imail.mail.pool); }