diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-16 00:42:56 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-16 00:42:56 +0100 |
commit | 3013fc57bdc97b0031c4f4250b9bdd172f4c0f4e (patch) | |
tree | fb3a52d4d0e2ded64e464488167ac7da43ae4605 /sysdep/linux/netlink.c | |
parent | abd4367f483bc29a03cce8bcfc70a83ac5d13cdc (diff) |
Netlink: Fix memory leak
Diffstat (limited to 'sysdep/linux/netlink.c')
-rw-r--r-- | sysdep/linux/netlink.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c index 72ff13fa..4cb51519 100644 --- a/sysdep/linux/netlink.c +++ b/sysdep/linux/netlink.c @@ -1666,14 +1666,6 @@ nl_parse_route(struct nl_parse_state *s, struct nlmsghdr *h) ra->nh.labels = labels; #endif - rte *e = rte_get_temp(ra); - e->net = net; - e->u.krt.src = src; - e->u.krt.proto = i->rtm_protocol; - e->u.krt.seen = 0; - e->u.krt.best = 0; - e->u.krt.metric = 0; - if (i->rtm_scope != def_scope) { ea_list *ea = lp_alloc(s->pool, sizeof(ea_list) + sizeof(eattr)); @@ -1687,9 +1679,6 @@ nl_parse_route(struct nl_parse_state *s, struct nlmsghdr *h) ea->attrs[0].u.data = i->rtm_scope; } - if (a[RTA_PRIORITY]) - e->u.krt.metric = rta_get_u32(a[RTA_PRIORITY]); - if (a[RTA_PREFSRC]) { ip_addr ps = rta_get_ipa(a[RTA_PREFSRC]); |