diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-22 21:39:18 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-24 14:04:20 +0200 |
commit | 92035b1db4a91d0fc95118a1e0ff73cfa6120b1b (patch) | |
tree | 8111c5128c76f620740a7ae7cf13e272fe791db0 /eigrpd/eigrp_query.c | |
parent | eigrpd: Cleanup list accessors (diff) | |
download | frr-92035b1db4a91d0fc95118a1e0ff73cfa6120b1b.tar.xz frr-92035b1db4a91d0fc95118a1e0ff73cfa6120b1b.zip |
eigrpd: Fix memory leak in FSM
The FSM was never freeing the msg. Since we
do not have a special queue for it, just don't
allocate the memory. In the future we can put
this back.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_query.c')
-rw-r--r-- | eigrpd/eigrp_query.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/eigrpd/eigrp_query.c b/eigrpd/eigrp_query.c index 00f9ee126..c82c90589 100644 --- a/eigrpd/eigrp_query.c +++ b/eigrpd/eigrp_query.c @@ -125,22 +125,19 @@ void eigrp_query_receive(struct eigrp *eigrp, struct ip *iph, /* If the destination exists (it should, but one never * know)*/ if (dest != NULL) { - struct eigrp_fsm_action_message *msg; - msg = XCALLOC(MTYPE_EIGRP_FSM_MSG, - sizeof(struct - eigrp_fsm_action_message)); + struct eigrp_fsm_action_message msg; struct eigrp_neighbor_entry *entry = eigrp_prefix_entry_lookup(dest->entries, nbr); - msg->packet_type = EIGRP_OPC_QUERY; - msg->eigrp = eigrp; - msg->data_type = EIGRP_TLV_IPv4_INT; - msg->adv_router = nbr; - msg->data.ipv4_int_type = tlv; - msg->entry = entry; - msg->prefix = dest; - int event = eigrp_get_fsm_event(msg); - eigrp_fsm_event(msg, event); + msg.packet_type = EIGRP_OPC_QUERY; + msg.eigrp = eigrp; + msg.data_type = EIGRP_TLV_IPv4_INT; + msg.adv_router = nbr; + msg.data.ipv4_int_type = tlv; + msg.entry = entry; + msg.prefix = dest; + int event = eigrp_get_fsm_event(&msg); + eigrp_fsm_event(&msg, event); } eigrp_IPv4_InternalTLV_free(tlv); break; |