diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-10 22:13:51 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-10 22:13:51 +0200 |
commit | d52ecaa1de6efa1fc400c8f25d674f40babc6e2f (patch) | |
tree | 351566ba666cfb6899d3bcb1b1c157d519e8426c /eigrpd/eigrp_query.c | |
parent | eigrpd: Cleanup leaked dest_addr (diff) | |
download | frr-d52ecaa1de6efa1fc400c8f25d674f40babc6e2f.tar.xz frr-d52ecaa1de6efa1fc400c8f25d674f40babc6e2f.zip |
eigrpd: Fix leak of ep
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_query.c')
-rw-r--r-- | eigrpd/eigrp_query.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/eigrpd/eigrp_query.c b/eigrpd/eigrp_query.c index 774461a09..3ef8f9a97 100644 --- a/eigrpd/eigrp_query.c +++ b/eigrpd/eigrp_query.c @@ -160,6 +160,7 @@ eigrp_send_query (struct eigrp_interface *ei) struct eigrp_neighbor *nbr; struct eigrp_prefix_entry *pe; char has_tlv; + bool ep_saved = false; ep = eigrp_packet_new(ei->ifp->mtu); @@ -218,6 +219,7 @@ eigrp_send_query (struct eigrp_interface *ei) { /*Put packet to retransmission queue*/ eigrp_fifo_push_head(nbr->retrans_queue, ep); + ep_saved = true; if (nbr->retrans_queue->count == 1) { @@ -225,4 +227,7 @@ eigrp_send_query (struct eigrp_interface *ei) } } } + + if (!ep_saved) + eigrp_packet_free(ep); } |