Date: Mon, 12 Apr 2021 02:26:14 GMT From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: bf5057691bb0 - main - cxgbe/tom: Fix potential leak in t4_aiotx_process_job. Message-ID: <202104120226.13C2QEYM038375@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=bf5057691bb0d1160d729772cdb4c449e366f5b4 commit bf5057691bb0d1160d729772cdb4c449e366f5b4 Author: Navdeep Parhar <np@FreeBSD.org> AuthorDate: 2021-04-04 22:04:31 +0000 Commit: Navdeep Parhar <np@FreeBSD.org> CommitDate: 2021-04-12 02:14:18 +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@ MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D29579 --- 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 7085be0844b7..07340709934a 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -2201,8 +2201,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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104120226.13C2QEYM038375>