Make sure to free the sf_buf if we've allocated it but fail to allocate
an mbuf (ENOBUFS) before returning so that we don't leak sf_bufs in the case where we're out of mbufs. Submitted by: David Greenman (dg)
This commit is contained in:
parent
2b0e48c014
commit
e91e9907ef
@ -1705,6 +1705,7 @@ retry_lookup:
|
||||
MGETHDR(m, M_WAIT, MT_DATA);
|
||||
if (m == NULL) {
|
||||
error = ENOBUFS;
|
||||
sf_buf_free((void *)sf->kva, PAGE_SIZE);
|
||||
goto done;
|
||||
}
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user