]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: hash_table_iterate_deinit(NULL) should be a no-op
authorJosef 'Jeff' Sipek <jeff.sipek@open-xchange.com>
Mon, 14 Jan 2019 23:27:12 +0000 (18:27 -0500)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Thu, 21 Mar 2019 08:02:33 +0000 (10:02 +0200)
src/lib/hash.c

index 57b44421fe9d2b12fef3318a1fbce3539ab41f91..967921ca80abadd904498e3364816ea215466cde 100644 (file)
@@ -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);