drivers/e1000: malloc size error

priv->mta is uint32_t

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
wangmingrong1 2024-12-25 16:18:54 +08:00 committed by Xiang Xiao
parent ebf1ab5392
commit 500d193096

View file

@ -1482,7 +1482,7 @@ static int e1000_probe(FAR struct pci_device_s *dev)
#ifdef CONFIG_NET_MCASTGROUP #ifdef CONFIG_NET_MCASTGROUP
/* Allocate MTA shadow */ /* Allocate MTA shadow */
priv->mta = kmm_zalloc(type->mta_regs); priv->mta = kmm_zalloc(type->mta_regs * sizeof(*priv->mta));
if (priv->mta == NULL) if (priv->mta == NULL)
{ {
nerr("alloc mta failed\n"); nerr("alloc mta failed\n");