mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-01 12:19:28 +00:00
m_defrag(9) does not touch original mbuf chain when it can't
allocate new mbuf. Free original mbuf chain when driver is not able to send the packet.
This commit is contained in:
parent
4e5422a9e6
commit
2c6d18ebc3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260429
@ -1660,6 +1660,7 @@ ale_encap(struct ale_softc *sc, struct mbuf **m_head)
|
||||
(mtod(m, intptr_t) & 3) != 0) {
|
||||
m = m_defrag(*m_head, M_NOWAIT);
|
||||
if (m == NULL) {
|
||||
m_freem(*m_head);
|
||||
*m_head = NULL;
|
||||
return (ENOBUFS);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user