]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Removing impossible code
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 12 Nov 2016 02:21:49 +0000 (21:21 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:15 +0000 (20:26 -0500)
We've already allocated the mp data structure
and am using hash_alloc_intern for the hash_get
function.  This will return the passed
in data structure.  There is no possibility
of mp being NULL.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_msdp.c

index 8e933222c6e9430ab122ec991d06288b97635d59..43e2e888f5df5bcd6c8a463c0ceb8539571ab109 100644 (file)
@@ -995,11 +995,6 @@ pim_msdp_peer_new(struct in_addr peer_addr, struct in_addr local_addr,
 
   /* insert into misc tables for easy access */
   mp = hash_get(msdp->peer_hash, mp, hash_alloc_intern);
-  if (!mp) {
-    zlog_err("%s: PIM hash get failure", __PRETTY_FUNCTION__);
-    pim_msdp_peer_free(mp);
-    return PIM_MSDP_ERR_OOM;
-  }
   listnode_add_sort(msdp->peer_list, mp);
 
   if (PIM_DEBUG_MSDP_EVENTS) {