mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 14:29:47 +00:00
bgpd: XMALLOC usage causes borken assumption in route_match_peer_free
The usage of XMALLOC for route_match_peer_compile causes the pc->interface to be non-NULL. The code assumes that pc->interface will be NULL. Ticket: CM-18824 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
8f9b48f955
commit
a633d869cc
@ -299,7 +299,7 @@ static void *route_match_peer_compile(const char *arg)
|
||||
struct bgp_match_peer_compiled *pc;
|
||||
int ret;
|
||||
|
||||
pc = XMALLOC(MTYPE_ROUTE_MAP_COMPILED,
|
||||
pc = XCALLOC(MTYPE_ROUTE_MAP_COMPILED,
|
||||
sizeof(struct bgp_match_peer_compiled));
|
||||
|
||||
ret = str2sockunion(strcmp(arg, "local") ? arg : "0.0.0.0", &pc->su);
|
||||
|
Loading…
Reference in New Issue
Block a user