From: Josef 'Jeff' Sipek Date: Mon, 14 Jan 2019 23:27:12 +0000 (-0500) Subject: lib: hash_table_iterate_deinit(NULL) should be a no-op X-Git-Tag: 2.3.6~102 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ddd6158073ad9752088947df9520a7263bae918d;p=thirdparty%2Fdovecot%2Fcore.git lib: hash_table_iterate_deinit(NULL) should be a no-op --- diff --git a/src/lib/hash.c b/src/lib/hash.c index 57b44421fe..967921ca80 100644 --- a/src/lib/hash.c +++ b/src/lib/hash.c @@ -420,6 +420,9 @@ void hash_table_iterate_deinit(struct hash_iterate_context **_ctx) { struct hash_iterate_context *ctx = *_ctx; + if (ctx == NULL) + return; + *_ctx = NULL; hash_table_thaw(ctx->table); i_free(ctx);