Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Use m_freem instead of m_free. Otherwise we're leaki...
details: https://anonhg.NetBSD.org/src/rev/249ed3af1f53
branches: trunk
changeset: 359481:249ed3af1f53
user: maxv <maxv%NetBSD.org@localhost>
date: Mon Feb 12 15:38:14 2018 +0000
description:
Use m_freem instead of m_free. Otherwise we're leaking the next mbufs in
the chain.
diffstat:
sys/net/if_gif.c | 6 +++---
sys/net/if_pppoe.c | 10 +++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
diffs (70 lines):
diff -r 21131973f63d -r 249ed3af1f53 sys/net/if_gif.c
--- a/sys/net/if_gif.c Mon Feb 12 12:52:12 2018 +0000
+++ b/sys/net/if_gif.c Mon Feb 12 15:38:14 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gif.c,v 1.138 2018/01/15 09:26:21 maxv Exp $ */
+/* $NetBSD: if_gif.c,v 1.139 2018/02/12 15:38:14 maxv Exp $ */
/* $KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.138 2018/01/15 09:26:21 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.139 2018/02/12 15:38:14 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -458,7 +458,7 @@
IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family);
if ((error = gif_check_nesting(ifp, m)) != 0) {
- m_free(m);
+ m_freem(m);
goto end;
}
diff -r 21131973f63d -r 249ed3af1f53 sys/net/if_pppoe.c
--- a/sys/net/if_pppoe.c Mon Feb 12 12:52:12 2018 +0000
+++ b/sys/net/if_pppoe.c Mon Feb 12 15:38:14 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pppoe.c,v 1.133 2017/12/07 10:22:04 ozaki-r Exp $ */
+/* $NetBSD: if_pppoe.c,v 1.134 2018/02/12 15:38:14 maxv Exp $ */
/*-
* Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.133 2017/12/07 10:22:04 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.134 2018/02/12 15:38:14 maxv Exp $");
#ifdef _KERNEL_OPT
#include "pppoe.h"
@@ -1795,7 +1795,7 @@
PPPOE_LOCK(sc, RW_READER);
if (sc->sc_state < PPPOE_STATE_SESSION) {
PPPOE_UNLOCK(sc);
- m_free(m);
+ m_freem(m);
return ENOBUFS;
}
@@ -1887,13 +1887,13 @@
pppoe_enqueue(struct ifqueue *inq, struct mbuf *m)
{
if (m->m_flags & M_PROMISC) {
- m_free(m);
+ m_freem(m);
return;
}
#ifndef PPPOE_SERVER
if (m->m_flags & (M_MCAST | M_BCAST)) {
- m_free(m);
+ m_freem(m);
return;
}
#endif
Home |
Main Index |
Thread Index |
Old Index