Merge pull request #13723 from FRRouting/mergify/bp/dev/9.0/pr-13624

bgpd: Free temp memory (backport #13624)
This commit is contained in:
Donatas Abraitis 2023-06-08 08:35:22 +03:00 committed by GitHub
commit 2681de7b19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,13 +189,16 @@ int bgp_nlri_parse_flowspec(struct peer *peer, struct attr *attr,
zlog_info("%s", local_string); zlog_info("%s", local_string);
} }
/* Process the route. */ /* Process the route. */
if (!withdraw) if (!withdraw) {
bgp_update(peer, &p, 0, attr, afi, safi, bgp_update(peer, &p, 0, attr, afi, safi,
ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, NULL, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, NULL,
NULL, 0, 0, NULL); NULL, 0, 0, NULL);
else } else {
bgp_withdraw(peer, &p, 0, afi, safi, ZEBRA_ROUTE_BGP, bgp_withdraw(peer, &p, 0, afi, safi, ZEBRA_ROUTE_BGP,
BGP_ROUTE_NORMAL, NULL, NULL, 0, NULL); BGP_ROUTE_NORMAL, NULL, NULL, 0, NULL);
} }
XFREE(MTYPE_TMP, temp);
}
return BGP_NLRI_PARSE_OK; return BGP_NLRI_PARSE_OK;
} }