uhso(4): Fix a null pointer dereference

The directly following m_defrag() call can wait, so there is no reason this
call can't as well.

Reported by:	Coverity
CID:		1353551
Sponsored by:	Dell EMC Isilon
This commit is contained in:
cem 2016-10-25 18:36:15 +00:00
parent adfae7408b
commit bd27ad9e0a

View File

@ -1752,7 +1752,7 @@ uhso_if_rxflush(void *arg)
* Allocate a new mbuf for this IP packet and
* copy the IP-packet into it.
*/
m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
m = m_getcl(M_WAITOK, MT_DATA, M_PKTHDR);
memcpy(mtod(m, uint8_t *), mtod(m0, uint8_t *), iplen);
m->m_pkthdr.len = m->m_len = iplen;