git: bf5057691bb0 - main - cxgbe/tom: Fix potential leak in t4_aiotx_process_job.
Navdeep Parhar
np at FreeBSD.org
Mon Apr 12 02:26:14 UTC 2021
The branch main has been updated by np:
URL: https://cgit.FreeBSD.org/src/commit/?id=bf5057691bb0d1160d729772cdb4c449e366f5b4
commit bf5057691bb0d1160d729772cdb4c449e366f5b4
Author: Navdeep Parhar <np at FreeBSD.org>
AuthorDate: 2021-04-04 22:04:31 +0000
Commit: Navdeep Parhar <np at 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);
}
More information about the dev-commits-src-main
mailing list