diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-10 22:09:29 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-10 22:09:29 +0200 |
commit | 60805e322ec54242c996e235a486b27e2a5f8cfe (patch) | |
tree | fa533c88dec9b9952f31f9433360d7c67aa809c3 /eigrpd/eigrp_interface.c | |
parent | eigrpd: Fix use after free (diff) | |
download | frr-60805e322ec54242c996e235a486b27e2a5f8cfe.tar.xz frr-60805e322ec54242c996e235a486b27e2a5f8cfe.zip |
eigrpd: Cleanup leaked dest_addr
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_interface.c')
-rw-r--r-- | eigrpd/eigrp_interface.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/eigrpd/eigrp_interface.c b/eigrpd/eigrp_interface.c index 26643452c..a9deafe25 100644 --- a/eigrpd/eigrp_interface.c +++ b/eigrpd/eigrp_interface.c @@ -291,13 +291,13 @@ eigrp_if_up (struct eigrp_interface *ei) /*Add connected entry to topology table*/ - struct prefix_ipv4 *dest_addr = prefix_ipv4_new (); + struct prefix_ipv4 dest_addr; - dest_addr->family = AF_INET; - dest_addr->prefix = ei->connected->address->u.prefix4; - dest_addr->prefixlen = ei->connected->address->prefixlen; - apply_mask_ipv4 (dest_addr); - pe = eigrp_topology_table_lookup_ipv4 (eigrp->topology_table, dest_addr); + dest_addr.family = AF_INET; + dest_addr.prefix = ei->connected->address->u.prefix4; + dest_addr.prefixlen = ei->connected->address->prefixlen; + apply_mask_ipv4 (&dest_addr); + pe = eigrp_topology_table_lookup_ipv4 (eigrp->topology_table, &dest_addr); if (pe == NULL) { @@ -305,7 +305,7 @@ eigrp_if_up (struct eigrp_interface *ei) pe->serno = eigrp->serno; pe->destination_ipv4 = prefix_ipv4_new (); prefix_copy ((struct prefix *)pe->destination_ipv4, - (struct prefix *)dest_addr); + (struct prefix *)&dest_addr); pe->af = AF_INET; pe->nt = EIGRP_TOPOLOGY_TYPE_CONNECTED; |