diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-22 15:39:18 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-24 08:04:20 -0400 |
| commit | 92035b1db4a91d0fc95118a1e0ff73cfa6120b1b (patch) | |
| tree | 8111c5128c76f620740a7ae7cf13e272fe791db0 /eigrpd/eigrp_siareply.c | |
| parent | 695ff37babda771517c85a20c714d8215ece0c63 (diff) | |
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_siareply.c')
| -rw-r--r-- | eigrpd/eigrp_siareply.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/eigrpd/eigrp_siareply.c b/eigrpd/eigrp_siareply.c index 3050b91032..c03a34322e 100644 --- a/eigrpd/eigrp_siareply.c +++ b/eigrpd/eigrp_siareply.c @@ -93,22 +93,19 @@ void eigrp_siareply_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_SIAQUERY; - 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_SIAQUERY; + 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); } |
