git: 81ec0d054652 - stable/13 - cxgbe/tom: Fix potential leak in t4_aiotx_process_job.
Navdeep Parhar
np at FreeBSD.org
Sun May 16 03:25:04 UTC 2021
The branch stable/13 has been updated by np:
URL: https://cgit.FreeBSD.org/src/commit/?id=81ec0d0546522af8e1870d11e162e5b479e90640
commit 81ec0d0546522af8e1870d11e162e5b479e90640
Author: Navdeep Parhar <np at FreeBSD.org>
AuthorDate: 2021-04-04 22:04:31 +0000
Commit: Navdeep Parhar <np at FreeBSD.org>
CommitDate: 2021-05-16 03:24:06 +0000
cxgbe/tom: Fix potential leak in t4_aiotx_process_job.
The mbuf allocated could be a chain and must be freed with m_freem.
Reviewed by: jhb@
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D29579
(cherry picked from commit bf5057691bb0d1160d729772cdb4c449e366f5b4)
---
sys/dev/cxgbe/tom/t4_cpl_io.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c
index 1e50bf860787..ee40d0646b71 100644
--- a/sys/dev/cxgbe/tom/t4_cpl_io.c
+++ b/sys/dev/cxgbe/tom/t4_cpl_io.c
@@ -2204,8 +2204,7 @@ out:
job->aio_error = (void *)(intptr_t)error;
aiotx_free_job(job);
}
- if (m != NULL)
- m_free(m);
+ m_freem(m);
SOCKBUF_LOCK(sb);
}
More information about the dev-commits-src-all
mailing list