From 928b6c101eba1158b29e2542f4fcd15727ba7c92 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 18 May 2009 15:21:51 +1200 Subject: [PATCH] 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. --- lib/hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.47.3