Skip to content

Commit

Permalink
lib-sieve: store action: Avoid NULL pointer dereference during rollba…
Browse files Browse the repository at this point in the history
…ck when transaction context is somehow unassigned.

This change matches the other transaction stages.
This will not currently happen though.
Reported by Coverity.
  • Loading branch information
stephanbosch committed Dec 3, 2017
1 parent 876bce6 commit c6f7267
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib-sieve/sieve-actions.c
Expand Up @@ -729,6 +729,8 @@ static void act_store_rollback
struct act_store_transaction *trans =
(struct act_store_transaction *) tr_context;

if ( trans == NULL ) return;

i_assert( trans->box != NULL );

if (!success) {
Expand Down

0 comments on commit c6f7267

Please sign in to comment.