mirror of
https://github.com/opnsense/src.git
synced 2026-06-13 18:50:31 -04: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
1 changed files with 1 additions and 0 deletions
|
|
@ -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 a new issue