Merge pull request #1449 from donaldsharp/match_local_peer

bgpd: XMALLOC usage causes borken assumption in route_match_peer_free
This commit is contained in:
Renato Westphal 2017-11-16 18:34:43 -02:00 committed by GitHub
commit 55dc9e113b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);