From: Amos Jeffries Date: Mon, 18 May 2009 03:21:51 +0000 (+1200) Subject: Replace assert with NOP action in hash free. X-Git-Tag: SQUID_3_2_0_1~1011 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=928b6c101eba1158b29e2542f4fcd15727ba7c92;p=thirdparty%2Fsquid.git Replace assert with NOP action in hash free. This resolves one small coverity itch. When nothing to free we don't really need to care, we do need to act safely and not try to actually action the free though. --- diff --git a/lib/hash.c b/lib/hash.c index 93c081777b..c998a10425 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -312,7 +312,8 @@ hashFreeItems(hash_table * hid, HASHFREE * free_func) void hashFreeMemory(hash_table * hid) { - assert(hid != NULL); + if(hid == NULL) + return; if (hid->buckets) xfree(hid->buckets); xfree(hid);