diff options
author | Daniel Walton <dwalton@cumulusnetworks.com> | 2016-03-10 04:58:48 +0100 |
---|---|---|
committer | Daniel Walton <dwalton@cumulusnetworks.com> | 2016-03-10 04:58:48 +0100 |
commit | f9e9e0736f46d4c24f974babb0cc9fb715290c22 (patch) | |
tree | 83a76b971aa6ca20b23f44bf6299bd939371995f /bgpd/bgp_open.c | |
parent | Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga in... (diff) | |
download | frr-f9e9e0736f46d4c24f974babb0cc9fb715290c22.tar.xz frr-f9e9e0736f46d4c24f974babb0cc9fb715290c22.zip |
BGP memory leak in peer hostname
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-9786
Diffstat (limited to 'bgpd/bgp_open.c')
-rw-r--r-- | bgpd/bgp_open.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index 4ddc53606..0adde3f89 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -627,7 +627,10 @@ bgp_capability_hostname (struct peer *peer, struct capability_header *hdr) str[len] = '\0'; if (peer->hostname != NULL) - XFREE(MTYPE_HOST, peer->hostname); + { + XFREE(MTYPE_HOST, peer->hostname); + peer->hostname = NULL; + } if (peer->domainname != NULL) { |