alloc space for nb->buf after taking ownership.

This commit is contained in:
Joris Vink 2018-07-18 14:36:13 +02:00
parent 27d1746940
commit 5a5d9fd0c2
1 changed files with 2 additions and 1 deletions

View File

@ -713,7 +713,8 @@ http_header_recv(struct netbuf *nb)
/* take full ownership of the buffer. */
req->headers = nb->buf;
nb->buf = NULL;
nb->m_len = 0;
nb->s_off = 0;
nb->buf = kore_malloc(nb->m_len);
for (i = 1; i < h; i++) {
if (i == skip)