Skip to content

Commit

Permalink
notify: Fix crash if NO_NOTIFY transaction is rolled back during commit
Browse files Browse the repository at this point in the history
Fixes: Panic: no notify_mail_txn found
  • Loading branch information
sirainen authored and cmouse committed Mar 10, 2018
1 parent eeef28c commit 27eea20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/notify/notify-storage.c
Expand Up @@ -146,7 +146,8 @@ notify_transaction_commit(struct mailbox_transaction_context *t,
bool no_notify = (t->flags & MAILBOX_TRANSACTION_FLAG_NO_NOTIFY) != 0;

if ((lbox->super.transaction_commit(t, changes_r)) < 0) {
notify_contexts_mail_transaction_rollback(t);
if (!no_notify)
notify_contexts_mail_transaction_rollback(t);
return -1;
}

Expand Down

0 comments on commit 27eea20

Please sign in to comment.