Found by Maxime Villard <max at m00nbsd ! net> with the Brainy Code Scanner,
thanks!
-/* $OpenBSD: hifn7751.c,v 1.169 2014/07/13 23:10:23 deraadt Exp $ */
+/* $OpenBSD: hifn7751.c,v 1.170 2015/05/12 12:56:47 mikeb Exp $ */
/*
* Invertex AEON / Hifn 7751 driver
}
}
MCLGET(m0, M_DONTWAIT);
- if (!(m0->m_flags & M_EXT))
+ if (!(m0->m_flags & M_EXT)) {
m_freem(m0);
+ return (NULL);
+ }
len = MCLBYTES;
totlen -= len;
}
MCLGET(m, M_DONTWAIT);
if (!(m->m_flags & M_EXT)) {
+ m_free(m);
m_freem(m0);
return (NULL);
}