]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3-migration: Fixed crash when not specifying pop3_migration_mailbox setting.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 15 Sep 2016 07:23:41 +0000 (10:23 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 15 Sep 2016 07:23:41 +0000 (10:23 +0300)
src/plugins/pop3-migration/pop3-migration-plugin.c

index c24fee452a12d07036ca75e670ea67242829b122..3bffbd32b4321227ec8cd45de83c0c00ca786781 100644 (file)
@@ -838,9 +838,14 @@ pop3_migration_mailbox_search_init(struct mailbox_transaction_context *t,
 
 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;