diff options
author | ru <ru@FreeBSD.org> | 2001-10-17 17:42:23 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-10-17 17:42:23 +0000 |
commit | 927ee0e1edb24651851d5805758d2bda6b428b73 (patch) | |
tree | e933aebafedbb820b5d1241c40fa658b75c605ee | |
parent | cbc26091b28ec9163fa14f32c524f60dcfb6d9ed (diff) | |
download | FreeBSD-src-927ee0e1edb24651851d5805758d2bda6b428b73.zip FreeBSD-src-927ee0e1edb24651851d5805758d2bda6b428b73.tar.gz |
Pull fix for memory leak in in6_losing() from netinet/in_pcb.c,v 1.85.
MFC after: 1 week
-rw-r--r-- | sys/netinet6/in6_pcb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 430d5e5..417ad0c 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -979,7 +979,6 @@ in6_losing(in6p) struct rt_addrinfo info; if ((rt = in6p->in6p_route.ro_rt) != NULL) { - in6p->in6p_route.ro_rt = 0; bzero((caddr_t)&info, sizeof(info)); info.rti_info[RTAX_DST] = (struct sockaddr *)&in6p->in6p_route.ro_dst; @@ -990,12 +989,12 @@ in6_losing(in6p) (void)rtrequest(RTM_DELETE, rt_key(rt), rt->rt_gateway, rt_mask(rt), rt->rt_flags, (struct rtentry **)0); - else + in6p->in6p_route.ro_rt = NULL; + rtfree(rt); /* * A new route can be allocated * the next time output is attempted. */ - rtfree(rt); } } |