Fix a ifa_release() leak for a specific struct rt_addrinfo.
ok by ozaki-r@n.o
This commit is contained in:
parent
647857abb4
commit
9b6ccc4b31
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: route.c,v 1.223 2019/09/25 09:53:37 ozaki-r Exp $ */
|
||||
/* $NetBSD: route.c,v 1.224 2019/09/30 10:22:14 knakahara Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
|
||||
@ -97,7 +97,7 @@
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.223 2019/09/25 09:53:37 ozaki-r Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.224 2019/09/30 10:22:14 knakahara Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#ifdef RTFLUSH_DEBUG
|
||||
@ -1400,8 +1400,11 @@ rt_update_get_ifa(const struct rt_addrinfo *info, const struct rtentry *rt,
|
||||
*ifp = ifa->ifa_ifp;
|
||||
if_acquire(*ifp, psref_ifp);
|
||||
if (info->rti_info[RTAX_IFA] == NULL &&
|
||||
info->rti_info[RTAX_GATEWAY] == NULL)
|
||||
info->rti_info[RTAX_GATEWAY] == NULL) {
|
||||
ifa_release(ifa, psref);
|
||||
ifa = NULL;
|
||||
goto next;
|
||||
}
|
||||
ifa_release(ifa, psref);
|
||||
if (info->rti_info[RTAX_IFA] == NULL) {
|
||||
/* route change <dst> <gw> -ifp <if> */
|
||||
|
Loading…
x
Reference in New Issue
Block a user