Fix possible NULL pointer dereference in ffec_alloc_mbufcl().

PR:		231514
Approved by:	re (kib)
MFC after:	1 week
This commit is contained in:
Andrey V. Elsukov 2018-09-21 13:44:05 +00:00
parent f789d9839a
commit 50f5c94edb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338857

View File

@ -801,7 +801,8 @@ ffec_alloc_mbufcl(struct ffec_softc *sc)
struct mbuf *m;
m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
m->m_pkthdr.len = m->m_len = m->m_ext.ext_size;
if (m != NULL)
m->m_pkthdr.len = m->m_len = m->m_ext.ext_size;
return (m);
}