bgpd: free notify packet after writing

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2017-06-12 06:46:56 +00:00
parent bea0122657
commit 3735936bda
No known key found for this signature in database
GPG Key ID: DAF48E0F57E0834F

View File

@ -514,6 +514,7 @@ static int bgp_write_notify(struct peer *peer)
/* only connection reset/close gets counted as TCP_fatal_error, failure
* to write the entire NOTIFY doesn't get different FSM treatment */
if (ret <= 0) {
stream_free(s);
BGP_EVENT_ADD(peer, TCP_fatal_error);
return 0;
}
@ -543,6 +544,8 @@ static int bgp_write_notify(struct peer *peer)
Connect instead of Idle */
BGP_EVENT_ADD(peer, BGP_Stop);
stream_free(s);
return 0;
}