We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fef93b2 commit b28984fCopy full SHA for b28984f
drivers/net/nfp/nfp_ethdev_vf.c
@@ -322,12 +322,13 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
322
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
323
return 0;
324
325
- net_hw->eth_xstats_base = rte_malloc("rte_eth_xstat",
326
- sizeof(struct rte_eth_xstat) * nfp_net_xstats_size(eth_dev), 0);
+ net_hw->eth_xstats_base = rte_calloc("rte_eth_xstat",
+ nfp_net_xstats_size(eth_dev), sizeof(struct rte_eth_xstat), 0);
327
if (net_hw->eth_xstats_base == NULL) {
328
PMD_INIT_LOG(ERR, "No memory for xstats base values on device %s!",
329
pci_dev->device.name);
330
- return -ENOMEM;
+ err = -ENOMEM;
331
+ goto hw_priv_free;
332
}
333
334
/* Work out where in the BAR the queues start. */
0 commit comments