git: bf1820f187bd - main - nvmecontrol: Fix a sizeof mismatch

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 10 May 2024 16:41:39 UTC
The branch main has been updated by jhb:

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

commit bf1820f187bd3f90935dc5514e61d1d3a394a21c
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-05-10 15:54:02 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-05-10 15:54:02 +0000

    nvmecontrol: Fix a sizeof mismatch
    
    In this case it is harmless since it is an array of pointers so the
    resulting length is identical.
    
    Reported by:    Coverity Scan
    CID:            1545055
    Sponsored by:   Chelsio Communications
---
 sbin/nvmecontrol/fabrics.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sbin/nvmecontrol/fabrics.c b/sbin/nvmecontrol/fabrics.c
index c9aca088c47e..d93e984ee7a3 100644
--- a/sbin/nvmecontrol/fabrics.c
+++ b/sbin/nvmecontrol/fabrics.c
@@ -488,7 +488,7 @@ connect_nvm_queues(const struct nvmf_association_params *aparams,
 	}
 
 	/* I/O queues. */
-	memset(io, 0, sizeof(io) * num_io_queues);
+	memset(io, 0, sizeof(*io) * num_io_queues);
 	for (u_int i = 0; i < num_io_queues; i++) {
 		memset(&qparams, 0, sizeof(qparams));
 		qparams.admin = false;