diff options
author | mdodd <mdodd@FreeBSD.org> | 2000-02-07 06:18:38 +0000 |
---|---|---|
committer | mdodd <mdodd@FreeBSD.org> | 2000-02-07 06:18:38 +0000 |
commit | 578abf357dea17f991e5205e70c5d76037fe552b (patch) | |
tree | a84b85a28e628bd2537a15c0d3f7621b0e1e5e21 /sys/net/if_vlan.c | |
parent | 547bebdd5d50b7deb2638cb5fd1b23716a8af006 (diff) | |
download | FreeBSD-src-578abf357dea17f991e5205e70c5d76037fe552b.zip FreeBSD-src-578abf357dea17f991e5205e70c5d76037fe552b.tar.gz |
m_pullup() frees the supplied mbuf on failure; we don't need to try
and do this ourselves.
Approved by: jkh
Noticed by: Mike Spengler <mks@networkcs.com>
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r-- | sys/net/if_vlan.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index cefaa9d..7e61949 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -193,7 +193,7 @@ vlan_start(struct ifnet *ifp) struct ifvlan *ifv; struct ifnet *p; struct ether_vlan_header *evl; - struct mbuf *m, *m0; + struct mbuf *m; ifv = ifp->if_softc; p = ifv->ifv_p; @@ -236,14 +236,12 @@ vlan_start(struct ifnet *ifp) } /* M_PREPEND takes care of m_len, m_pkthdr.len for us */ - m0 = m_pullup(m, ETHER_HDR_LEN + EVL_ENCAPLEN); - if (m0 == NULL) { + m = m_pullup(m, ETHER_HDR_LEN + EVL_ENCAPLEN); + if (m == NULL) { printf("vlan%d: m_pullup failed", ifp->if_unit); ifp->if_ierrors++; - m_freem(m); continue; } - m = m0; /* * Transform the Ethernet header into an Ethernet header |