Skip to content

Commit

Permalink
quota-clone: Fix assert-crash at deinit if quota_clone update fails
Browse files Browse the repository at this point in the history
The timeout isn't removed on failure, so it crashed with:
Panic: file quota-clone-plugin.c: line 257 (quota_clone_mail_user_deinit_pre): assertion failed: (quser->to_quota_flush == NULL)
  • Loading branch information
sirainen authored and cmouse committed Aug 7, 2018
1 parent ea26c32 commit 13b36eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/quota-clone/quota-clone-plugin.c
Expand Up @@ -240,7 +240,9 @@ static void quota_clone_mail_user_deinit_pre(struct mail_user *user)
i_assert(!quser->quota_flushing);
quota_clone_flush(user);
dict_wait(quser->dict);
i_assert(quser->to_quota_flush == NULL);
/* If dict update fails or background calculation is running,
the timeout is still set. Just forget about it. */
timeout_remove(&quser->to_quota_flush);
}
quser->module_ctx.super.deinit_pre(user);
}
Expand Down

0 comments on commit 13b36eb

Please sign in to comment.