mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
bbe8edb0ac
commit
794cd879fe
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Reference in a new issue