From c37e1f598b794c0a4f6b834c6be6642b9168fbbd Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 30 May 2018 09:42:24 -0400 Subject: [PATCH] pimd: hash_get w/ hash_alloc_intern cannot fail The assignment of sa with the usage of hash_get and hash_alloc_intern can never fail. No need to look for a failure case. Found by Coverity SA. Signed-off-by: Donald Sharp --- pimd/pim_msdp.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c index 7afc37a28e..e798d70a51 100644 --- a/pimd/pim_msdp.c +++ b/pimd/pim_msdp.c @@ -254,11 +254,6 @@ static struct pim_msdp_sa *pim_msdp_sa_new(struct pim_instance *pim, /* insert into misc tables for easy access */ sa = hash_get(pim->msdp.sa_hash, sa, hash_alloc_intern); - if (!sa) { - zlog_err("%s: PIM hash get failure", __PRETTY_FUNCTION__); - pim_msdp_sa_free(sa); - return NULL; - } listnode_add_sort(pim->msdp.sa_list, sa); if (PIM_DEBUG_MSDP_EVENTS) { -- 2.39.5