Skip to content

Commit

Permalink
doveadm mailbox update: Avoid assert-crash on errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Jul 1, 2016
1 parent ad7302c commit 8d3f4a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/doveadm/doveadm-mail-mailbox.c
Expand Up @@ -639,6 +639,7 @@ int cmd_mailbox_update_run(struct doveadm_mail_cmd_context *_ctx,
struct update_cmd_context *ctx = (struct update_cmd_context *)_ctx;
struct mail_namespace *ns;
struct mailbox *box;
enum mail_error mail_error;
int ret = 0;

ns = mail_namespace_find(user->namespaces, ctx->mailbox);
Expand All @@ -647,7 +648,8 @@ int cmd_mailbox_update_run(struct doveadm_mail_cmd_context *_ctx,
if ((ret = mailbox_update(box, &(ctx->update))) != 0) {
i_error("Cannot update %s: %s",
ctx->mailbox,
mailbox_get_last_error(box, NULL));
mailbox_get_last_error(box, &mail_error));
doveadm_mail_failed_error(_ctx, mail_error);
}

mailbox_free(&box);
Expand Down

0 comments on commit 8d3f4a6

Please sign in to comment.