diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-09-21 06:13:07 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-09-21 06:13:07 +0000 |
commit | 6ef549c7bac21806589e50882afc88ea04505058 (patch) | |
tree | 0586d733bce08df9ad79acdf6ed405ea0b546a6c /sys/net/if_mpe.c | |
parent | 34e3fa436a4af2aab7f332da41beea120db9da23 (diff) |
No need to m_freem() a NULL pointer and change the error for unknown
protocols to EPFNOSUPPORT.
Diffstat (limited to 'sys/net/if_mpe.c')
-rw-r--r-- | sys/net/if_mpe.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c index 870360f2beb..965390fec42 100644 --- a/sys/net/if_mpe.c +++ b/sys/net/if_mpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpe.c,v 1.22 2010/08/25 13:57:07 claudio Exp $ */ +/* $OpenBSD: if_mpe.c,v 1.23 2010/09/21 06:13:06 claudio Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -242,7 +242,6 @@ mpeoutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, off = sizeof(sa_family_t) + sizeof(in_addr_t); M_PREPEND(m, sizeof(shim) + off, M_DONTWAIT); if (m == NULL) { - m_freem(m); error = ENOBUFS; goto out; } @@ -253,7 +252,7 @@ mpeoutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, #endif default: m_freem(m); - error = ENETDOWN; + error = EPFNOSUPPORT; goto out; } |