From 8cadd54e59bb71aa45e4fa0df9c8aeb26c0e0f08 Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Fri, 14 May 2021 01:44:16 +0300 Subject: [PATCH] Revert "bgpd: Prevent null deref" This reverts commit e80bc08944be7cbe4085c03653818139ccd616d1. --- bgpd/bgp_nb_config.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bgpd/bgp_nb_config.c b/bgpd/bgp_nb_config.c index 230ca7fc85..11d0f97de3 100644 --- a/bgpd/bgp_nb_config.c +++ b/bgpd/bgp_nb_config.c @@ -6275,11 +6275,7 @@ static struct peer *bgp_peer_group_peer_lookup(struct bgp *bgp, struct peer_group *group = NULL; group = peer_group_lookup(bgp, peer_str); - - if (group) - return group->conf; - - return NULL; + return group->conf; } /*