bgpd: Check for NULL before assigning a peer from the group

CID 1566056

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
Donatas Abraitis 2023-06-27 09:50:02 +03:00
parent 4262dc3bd8
commit 860e427758

View File

@ -8333,7 +8333,8 @@ struct peer *peer_lookup_in_view(struct vty *vty, struct bgp *bgp,
if (!peer) {
group = peer_group_lookup(bgp, ip_str);
peer = listnode_head(group->peer);
if (group)
peer = listnode_head(group->peer);
}
if (!peer) {