]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: hash_table_destroy(NULL) should be a no-op
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 14 Jan 2019 15:52:26 +0000 (17:52 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Thu, 21 Mar 2019 08:02:32 +0000 (10:02 +0200)
src/lib/hash.c

index 3f53c6ac35a989c3d590c4785e4ff94d53d8126d..57b44421fe9d2b12fef3318a1fbce3539ab41f91 100644 (file)
@@ -133,6 +133,8 @@ void hash_table_destroy(struct hash_table **_table)
 {
        struct hash_table *table = *_table;
 
+       if (table == NULL)
+               return;
        *_table = NULL;
 
        i_assert(table->frozen == 0);