Mercurial > dovecot > core-2.2
changeset 20746:6c827dbef85e
pop3-migration: Fixed crash when not specifying pop3_migration_mailbox setting.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Thu, 15 Sep 2016 10:23:41 +0300 |
parents | 244720af3113 |
children | 0f5809a9f137 |
files | src/plugins/pop3-migration/pop3-migration-plugin.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/pop3-migration/pop3-migration-plugin.c Wed Sep 14 14:19:39 2016 +0300 +++ b/src/plugins/pop3-migration/pop3-migration-plugin.c Thu Sep 15 10:23:41 2016 +0300 @@ -841,9 +841,14 @@ static void pop3_migration_mailbox_allocated(struct mailbox *box) { + struct pop3_migration_mail_storage *mstorage = + POP3_MIGRATION_CONTEXT(box->storage); struct mailbox_vfuncs *v = box->vlast; struct pop3_migration_mailbox *mbox; + if (mstorage == NULL) + return; + mbox = p_new(box->pool, struct pop3_migration_mailbox, 1); mbox->module_ctx.super = *v; box->vlast = &mbox->module_ctx.super;