Netlink: Fix memory leak
This commit is contained in:
parent
abd4367f48
commit
3013fc57bd
1 changed files with 0 additions and 11 deletions
|
@ -1666,14 +1666,6 @@ nl_parse_route(struct nl_parse_state *s, struct nlmsghdr *h)
|
||||||
ra->nh.labels = labels;
|
ra->nh.labels = labels;
|
||||||
#endif
|
#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)
|
if (i->rtm_scope != def_scope)
|
||||||
{
|
{
|
||||||
ea_list *ea = lp_alloc(s->pool, sizeof(ea_list) + sizeof(eattr));
|
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;
|
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])
|
if (a[RTA_PREFSRC])
|
||||||
{
|
{
|
||||||
ip_addr ps = rta_get_ipa(a[RTA_PREFSRC]);
|
ip_addr ps = rta_get_ipa(a[RTA_PREFSRC]);
|
||||||
|
|
Loading…
Reference in a new issue