summaryrefslogtreecommitdiff
path: root/lib/hash.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2019-03-06 15:54:44 +0100
committerGitHub <noreply@github.com>2019-03-06 15:54:44 +0100
commitd3b05897edff14ceb71c2f5603a9fcdb1ae10c83 (patch)
tree274b088939d9686c289d5de95d70cdb39a01e4b4 /lib/hash.c
parentb19abe1131daa38d1d0e31c4793925bb89f11c07 (diff)
parent25af5f0d79f9e5595b1ba3bb04a0aff876471029 (diff)
Merge pull request #3869 from qlyoung/cocci-fixes
Assorted Coccinelle fixes
Diffstat (limited to 'lib/hash.c')
-rw-r--r--lib/hash.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/hash.c b/lib/hash.c
index 9f9fc31d37..c02b81814c 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -95,8 +95,6 @@ static void hash_expand(struct hash *hash)
new_index = XCALLOC(MTYPE_HASH_INDEX,
sizeof(struct hash_bucket *) * new_size);
- if (new_index == NULL)
- return;
hash->stats.empty = new_size;
@@ -324,8 +322,7 @@ void hash_free(struct hash *hash)
}
pthread_mutex_unlock(&_hashes_mtx);
- if (hash->name)
- XFREE(MTYPE_HASH, hash->name);
+ XFREE(MTYPE_HASH, hash->name);
XFREE(MTYPE_HASH_INDEX, hash->index);
XFREE(MTYPE_HASH, hash);