mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-11-05 09:14:45 +00:00
bgpd: fix aspath memleak on error in vnc_direct_bgp_add_nve
bgp_attr_default_set creates a new empty aspath. If family error happens, this aspath is not freed. Move attr initialization after we checked the family. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
afb254d792
commit
606c3f9fb2
@ -975,9 +975,6 @@ void vnc_direct_bgp_add_nve(struct bgp *bgp, struct rfapi_descriptor *rfd)
|
|||||||
|
|
||||||
import_table = rfg->rfapi_import_table;
|
import_table = rfg->rfapi_import_table;
|
||||||
|
|
||||||
bgp_attr_default_set(&attr, BGP_ORIGIN_INCOMPLETE);
|
|
||||||
/* TBD set some configured med, see add_vnc_route() */
|
|
||||||
|
|
||||||
if (afi == AFI_IP || afi == AFI_IP6) {
|
if (afi == AFI_IP || afi == AFI_IP6) {
|
||||||
rt = import_table->imported_vpn[afi];
|
rt = import_table->imported_vpn[afi];
|
||||||
} else {
|
} else {
|
||||||
@ -986,6 +983,9 @@ void vnc_direct_bgp_add_nve(struct bgp *bgp, struct rfapi_descriptor *rfd)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bgp_attr_default_set(&attr, BGP_ORIGIN_INCOMPLETE);
|
||||||
|
/* TBD set some configured med, see add_vnc_route() */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Walk the NVE-Group's VNC Import table
|
* Walk the NVE-Group's VNC Import table
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user