mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 11:18:52 +00:00
bgpd: Prevent use after free from coverity's perspective
Prevent a use after free from coverity's perspective. A bgp node may have been freed. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
e7f0bbb198
commit
4eaf14e1e3
@ -1179,12 +1179,13 @@ leak_update(struct bgp *to_bgp, struct bgp_dest *bn,
|
|||||||
/* Process change. */
|
/* Process change. */
|
||||||
bgp_aggregate_increment(to_bgp, p, bpi, afi, safi);
|
bgp_aggregate_increment(to_bgp, p, bpi, afi, safi);
|
||||||
bgp_process(to_bgp, bn, afi, safi);
|
bgp_process(to_bgp, bn, afi, safi);
|
||||||
bgp_dest_unlock_node(bn);
|
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
zlog_debug("%s: ->%s: %pBD Found route, changed attr",
|
zlog_debug("%s: ->%s: %pBD Found route, changed attr",
|
||||||
__func__, to_bgp->name_pretty, bn);
|
__func__, to_bgp->name_pretty, bn);
|
||||||
|
|
||||||
|
bgp_dest_unlock_node(bn);
|
||||||
|
|
||||||
return bpi;
|
return bpi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user