]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-dict: Make dict_transaction_rollback(NULL) a no-op
authorJosef 'Jeff' Sipek <jeff.sipek@open-xchange.com>
Mon, 22 Feb 2021 22:41:23 +0000 (17:41 -0500)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 3 Mar 2021 12:36:16 +0000 (12:36 +0000)
src/lib-dict/dict.c

index 64bebe39c3d41d081ff6925ed2d08a8bde38c3d8..b51aaa8a8040e945bdac4484f076543ba7e7a3db 100644 (file)
@@ -585,6 +585,10 @@ void dict_transaction_commit_async(struct dict_transaction_context **_ctx,
 void dict_transaction_rollback(struct dict_transaction_context **_ctx)
 {
        struct dict_transaction_context *ctx = *_ctx;
+
+       if (ctx == NULL)
+               return;
+
        struct event *event = ctx->event;
 
        *_ctx = NULL;