From 9120498487b3cb16e7530d2295ea33312abb104e Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Wed, 15 Sep 2021 13:21:21 +0300 Subject: bgpd: fix coverity warning CID 1506874. Signed-off-by: Igor Ryzhov --- bgpd/bgp_updgrp_adv.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bgpd') diff --git a/bgpd/bgp_updgrp_adv.c b/bgpd/bgp_updgrp_adv.c index 3b7ee8b0b6..96febcd5df 100644 --- a/bgpd/bgp_updgrp_adv.c +++ b/bgpd/bgp_updgrp_adv.c @@ -798,6 +798,9 @@ void subgroup_default_originate(struct update_subgroup *subgrp, int withdraw) bgp_attr_default_set(&attr, BGP_ORIGIN_IGP); + /* make coverity happy */ + assert(attr.aspath); + attr.local_pref = bgp->default_local_pref; if ((afi == AFI_IP6) || peer_cap_enhe(peer, afi, safi)) { -- cgit v1.2.3