Fix a panic happening when m_getm() is called with len < MCLBYTES.

Reported by:	ale
Tested by:	ale
Reviewed by:	bosko
This commit is contained in:
Maxime Henrion 2004-06-09 14:53:35 +00:00
parent 0e939c0cea
commit 931f76ab48

View File

@ -123,9 +123,9 @@ m_getm(struct mbuf *m, int len, int how, short type)
if (num > 0) {
if ((top = cur = m_getcl(how, type, 0)) == NULL)
goto failed;
top->m_len = 0;
}
num--;
top->m_len = 0;
for (i = 0; i < num; i++) {
mb = m_getcl(how, type, 0);