From 500d193096cb037eaf3d267a9b6c3bd6983227fd Mon Sep 17 00:00:00 2001 From: wangmingrong1 Date: Wed, 25 Dec 2024 16:18:54 +0800 Subject: [PATCH] drivers/e1000: malloc size error priv->mta is uint32_t Signed-off-by: wangmingrong1 --- drivers/net/e1000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index 10b24ffd7a..536c7a0300 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -1482,7 +1482,7 @@ static int e1000_probe(FAR struct pci_device_s *dev) #ifdef CONFIG_NET_MCASTGROUP /* Allocate MTA shadow */ - priv->mta = kmm_zalloc(type->mta_regs); + priv->mta = kmm_zalloc(type->mta_regs * sizeof(*priv->mta)); if (priv->mta == NULL) { nerr("alloc mta failed\n");