svn commit: r357263 - head/sys/net
Alexander V. Chernikov
melifaro at FreeBSD.org
Wed Jan 29 18:41:36 UTC 2020
Author: melifaro
Date: Wed Jan 29 18:41:35 2020
New Revision: 357263
URL: https://svnweb.freebsd.org/changeset/base/357263
Log:
Plug parent iface refcount leak on <ifname>.X vlan creation.
PR: kern/242270
Submitted by: Andrew Boyer <aboyer at pensando.io>
MFC after: 2 weeks
Modified:
head/sys/net/if_vlan.c
Modified: head/sys/net/if_vlan.c
==============================================================================
--- head/sys/net/if_vlan.c Wed Jan 29 18:13:44 2020 (r357262)
+++ head/sys/net/if_vlan.c Wed Jan 29 18:41:35 2020 (r357263)
@@ -963,10 +963,14 @@ vlan_clone_match_ethervid(const char *name, int *vidp)
static int
vlan_clone_match(struct if_clone *ifc, const char *name)
{
+ struct ifnet *ifp;
const char *cp;
- if (vlan_clone_match_ethervid(name, NULL) != NULL)
+ ifp = vlan_clone_match_ethervid(name, NULL);
+ if (ifp != NULL) {
+ if_rele(ifp);
return (1);
+ }
if (strncmp(vlanname, name, strlen(vlanname)) != 0)
return (0);
More information about the svn-src-head
mailing list