Fix corner case where m_len was not being initialized.
Submitted by: Maksim Yevmenkin <myevmenk@digisle.net> MFC after: 1 week
This commit is contained in:
parent
b2d0db1ef4
commit
780e83640b
@ -588,8 +588,10 @@ m_split(struct mbuf *m0, int len0, int wait)
|
|||||||
if (n->m_next == NULL) {
|
if (n->m_next == NULL) {
|
||||||
(void) m_free(n);
|
(void) m_free(n);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
} else
|
} else {
|
||||||
|
n->m_len = 0;
|
||||||
return (n);
|
return (n);
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
MH_ALIGN(n, remain);
|
MH_ALIGN(n, remain);
|
||||||
} else if (remain == 0) {
|
} else if (remain == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user