Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 May 2021 03:25:04 GMT
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 81ec0d054652 - stable/13 - cxgbe/tom: Fix potential leak in t4_aiotx_process_job.
Message-ID:  <202105160325.14G3P4ek006838@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by np:

URL: https://cgit.FreeBSD.org/src/commit/?id=81ec0d0546522af8e1870d11e162e5b479e90640

commit 81ec0d0546522af8e1870d11e162e5b479e90640
Author:     Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2021-04-04 22:04:31 +0000
Commit:     Navdeep Parhar <np@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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105160325.14G3P4ek006838>