]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Replace assert with NOP action in hash free.
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 18 May 2009 03:21:51 +0000 (15:21 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 18 May 2009 03:21:51 +0000 (15:21 +1200)
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.

lib/hash.c

index 93c081777b13f65c09774551fa4beb70e2bd4745..c998a104253e4c82e86e88420743f4e11a0c565c 100644 (file)
@@ -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);