mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-02 18:52:04 +00:00
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 <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
a9bafa95d0
commit
c37e1f598b
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user