artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e91a684
)
fixes potential memory leak. if_vinput() should always consume packet
author
sashan
<sashan@openbsd.org>
Tue, 7 Jun 2022 22:18:34 +0000
(22:18 +0000)
committer
sashan
<sashan@openbsd.org>
Tue, 7 Jun 2022 22:18:34 +0000
(22:18 +0000)
by either passing it further or releasing it.
OK mvs@
sys/net/if.c
patch
|
blob
|
history
diff --git
a/sys/net/if.c
b/sys/net/if.c
index
f354c9d
..
58af573
100644
(file)
--- a/
sys/net/if.c
+++ b/
sys/net/if.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: if.c,v 1.65
2 2022/05/03 11:47:03 bluhm Exp $
*/
+/* $OpenBSD: if.c,v 1.65
3 2022/06/07 22:18:34 sashan Exp $
*/
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@
-869,6
+869,8
@@
if_vinput(struct ifnet *ifp, struct mbuf *m)
if (__predict_true(!ISSET(ifp->if_xflags, IFXF_MONITOR)))
(*ifp->if_input)(ifp, m);
+ else
+ m_freem(m);
}
void