From: Timo Sirainen Date: Mon, 14 Jan 2019 15:52:26 +0000 (+0200) Subject: lib: hash_table_destroy(NULL) should be a no-op X-Git-Tag: 2.3.9~939 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22c42e272c78b027104d2bbbdbde89c65ceaf8ee;p=thirdparty%2Fdovecot%2Fcore.git lib: hash_table_destroy(NULL) should be a no-op --- diff --git a/src/lib/hash.c b/src/lib/hash.c index 3f53c6ac35..57b44421fe 100644 --- a/src/lib/hash.c +++ b/src/lib/hash.c @@ -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);