summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>2002-03-26 19:12:57 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>2002-03-26 19:12:57 +0000
commit27acdfd63f6305a453113b9ab926271f446aee9d (patch)
treeb27090f178dd0d283ac83b4a066080f468e812fa /sys
parent410d402f1b156d84b76644d151604fdea02eb25b (diff)
m_freem(NULL) bad style, ok jason@
Diffstat (limited to 'sys')
-rw-r--r--sys/netipx/spx_usrreq.c3
-rw-r--r--sys/netiso/if_eon.c5
-rw-r--r--sys/netiso/tp_inet.c3
-rw-r--r--sys/netns/spp_usrreq.c3
4 files changed, 6 insertions, 8 deletions
diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c
index ef961ea9e73..6fbac821bc4 100644
--- a/sys/netipx/spx_usrreq.c
+++ b/sys/netipx/spx_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spx_usrreq.c,v 1.17 2001/09/23 10:22:13 mickey Exp $ */
+/* $OpenBSD: spx_usrreq.c,v 1.18 2002/03/26 19:12:56 niklas Exp $ */
/*-
*
@@ -810,7 +810,6 @@ spx_output(cb, m0)
if (m0->m_len < sizeof(*sh)) {
if((m0 = m_pullup(m0, sizeof(*sh))) == NULL) {
(void) m_free(m);
- m_freem(m0);
return (EINVAL);
}
m->m_next = m0;
diff --git a/sys/netiso/if_eon.c b/sys/netiso/if_eon.c
index 3b97c1f4fd9..7d1bcf79aad 100644
--- a/sys/netiso/if_eon.c
+++ b/sys/netiso/if_eon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_eon.c,v 1.14 2002/03/15 18:19:53 millert Exp $ */
+/* $OpenBSD: if_eon.c,v 1.15 2002/03/26 19:12:56 niklas Exp $ */
/* $NetBSD: if_eon.c,v 1.15 1996/05/09 22:29:37 scottr Exp $ */
/*-
@@ -484,7 +484,8 @@ eoninput(struct mbuf *m, ...)
}
#endif
eonifp->if_ierrors++;
- m_freem(m);
+ if (m != 0)
+ m_freem(m);
return;
}
}
diff --git a/sys/netiso/tp_inet.c b/sys/netiso/tp_inet.c
index 16b7e6cf434..73e9de88491 100644
--- a/sys/netiso/tp_inet.c
+++ b/sys/netiso/tp_inet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tp_inet.c,v 1.8 2002/03/15 18:19:53 millert Exp $ */
+/* $OpenBSD: tp_inet.c,v 1.9 2002/03/26 19:12:56 niklas Exp $ */
/* $NetBSD: tp_inet.c,v 1.11 1996/03/16 23:13:49 christos Exp $ */
/*-
@@ -588,7 +588,6 @@ discard:
tptrace(TPPTmisc, "tpip_input DISCARD m", m, 0, 0, 0);
}
#endif
- m_freem(m);
IncStat(ts_recv_drop);
splx(s);
}
diff --git a/sys/netns/spp_usrreq.c b/sys/netns/spp_usrreq.c
index 48759d4910a..c32a7901459 100644
--- a/sys/netns/spp_usrreq.c
+++ b/sys/netns/spp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spp_usrreq.c,v 1.12 2002/03/15 18:19:53 millert Exp $ */
+/* $OpenBSD: spp_usrreq.c,v 1.13 2002/03/26 19:12:56 niklas Exp $ */
/* $NetBSD: spp_usrreq.c,v 1.9 1996/02/13 22:14:13 christos Exp $ */
/*
@@ -848,7 +848,6 @@ spp_output(struct mbuf *m0, ...)
if (m0->m_len < sizeof (*sh)) {
if((m0 = m_pullup(m0, sizeof(*sh))) == NULL) {
(void) m_free(m);
- m_freem(m0);
return (EINVAL);
}
m->m_next = m0;