summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_updgrp_packet.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-06-10 21:37:02 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-06-10 21:37:02 +0200
commit29c60afb6b661fcb7251bd16a2d59605b4756e01 (patch)
treec4b2f91546ff4ce889078e512f2a53f2acb9df40 /bgpd/bgp_updgrp_packet.c
parentMerge pull request #678 from chiragshah6/pim_dev (diff)
downloadfrr-29c60afb6b661fcb7251bd16a2d59605b4756e01.tar.xz
frr-29c60afb6b661fcb7251bd16a2d59605b4756e01.zip
bgpd: Free allocated stream in error code
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_updgrp_packet.c')
-rw-r--r--bgpd/bgp_updgrp_packet.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c
index 567e1e927..51abc19be 100644
--- a/bgpd/bgp_updgrp_packet.c
+++ b/bgpd/bgp_updgrp_packet.c
@@ -451,6 +451,7 @@ bpacket_reformat_for_peer (struct bpacket *pkt, struct peer_af *paf)
/* TODO: handle IPv6 nexthops */
zlog_warn ("%s: %s: invalid MP nexthop length (AFI IP): %u",
__func__, peer->host, nhlen);
+ stream_free (s);
return NULL;
}
@@ -542,6 +543,7 @@ bpacket_reformat_for_peer (struct bpacket *pkt, struct peer_af *paf)
/* TODO: handle IPv4 nexthops */
zlog_warn ("%s: %s: invalid MP nexthop length (AFI IP6): %u",
__func__, peer->host, nhlen);
+ stream_free (s);
return NULL;
}