From: Josef 'Jeff' Sipek Date: Mon, 22 Feb 2021 22:43:49 +0000 (-0500) Subject: lib-dict: Make dict_iterate_deinit(NULL) a no-op X-Git-Tag: 2.3.15~329 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d7446176efceb9b7c7b2c3d54814479ef9af4cd8;p=thirdparty%2Fdovecot%2Fcore.git lib-dict: Make dict_iterate_deinit(NULL) a no-op --- diff --git a/src/lib-dict/dict.c b/src/lib-dict/dict.c index b51aaa8a80..d43e2e5072 100644 --- a/src/lib-dict/dict.c +++ b/src/lib-dict/dict.c @@ -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;