summaryrefslogtreecommitdiff
path: root/eigrpd/eigrp_reply.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-08-22 15:39:18 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-08-24 08:04:20 -0400
commit92035b1db4a91d0fc95118a1e0ff73cfa6120b1b (patch)
tree8111c5128c76f620740a7ae7cf13e272fe791db0 /eigrpd/eigrp_reply.c
parent695ff37babda771517c85a20c714d8215ece0c63 (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_reply.c')
-rw-r--r--eigrpd/eigrp_reply.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/eigrpd/eigrp_reply.c b/eigrpd/eigrp_reply.c
index e59db80393..4e909283d6 100644
--- a/eigrpd/eigrp_reply.c
+++ b/eigrpd/eigrp_reply.c
@@ -196,9 +196,7 @@ void eigrp_reply_receive(struct eigrp *eigrp, struct ip *iph,
*/
assert(dest);
- 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);
@@ -237,15 +235,15 @@ void eigrp_reply_receive(struct eigrp *eigrp, struct ip *iph,
* End of filtering
*/
- msg->packet_type = EIGRP_OPC_REPLY;
- 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_REPLY;
+ 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);