From: Igor Ryzhov Date: Wed, 15 Sep 2021 10:21:21 +0000 (+0300) Subject: bgpd: fix coverity warning X-Git-Tag: base_8.1~54^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=9120498487b3cb16e7530d2295ea33312abb104e;p=matthieu%2Ffrr.git bgpd: fix coverity warning CID 1506874. Signed-off-by: Igor Ryzhov --- 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)) {