Fix route entry leak.
authorbluhm <bluhm@openbsd.org>
Sun, 9 Jul 2023 19:06:48 +0000 (19:06 +0000)
committerbluhm <bluhm@openbsd.org>
Sun, 9 Jul 2023 19:06:48 +0000 (19:06 +0000)
commitec216fe2d2cefdfbf22c1e7aa0935c00cddfd627
tree14c0e5d0d691fc6477f75d0f1f1a5669ccc6db43
parentc38a592a1b12eb01d4ec5b18d4798399a59acc4b
Fix route entry leak.

In in6_ifdetach() two struct rtentry were leaked.  This was triggered
by regress/sbin/route and detected with btrace(8) refcnt.  The
reference returned by rtalloc() must be freed with rtfree() in all
cases.

OK phessler@ mvs@
sys/netinet6/in6_ifattach.c