]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-dict: Make dict_iterate_deinit(NULL) a no-op
authorJosef 'Jeff' Sipek <jeff.sipek@open-xchange.com>
Mon, 22 Feb 2021 22:43:49 +0000 (17:43 -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 b51aaa8a8040e945bdac4484f076543ba7e7a3db..d43e2e5072097ffa42a051b3ad181cdcfe29729c 100644 (file)
@@ -438,6 +438,10 @@ int dict_iterate_deinit(struct dict_iterate_context **_ctx,
                        const char **error_r)
 {
        struct dict_iterate_context *ctx = *_ctx;
+
+       if (ctx == NULL)
+               return 0;
+
        struct event *event = ctx->event;
        int ret;
        uint64_t rows;