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>
(cherry picked from commit
606c3f9fb2e164ea3f2fe87b46f99c4be44104bc)
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) {
rt = import_table->imported_vpn[afi];
} else {
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
*/