The branch main has been updated by np:

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

commit bf5057691bb0d1160d729772cdb4c449e366f5b4
Author:     Navdeep Parhar <n...@freebsd.org>
AuthorDate: 2021-04-04 22:04:31 +0000
Commit:     Navdeep Parhar <n...@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);
 }
 
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to