summaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/mlx4_intr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mlx4/mlx4_intr.c')
-rw-r--r--drivers/net/mlx4/mlx4_intr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mlx4/mlx4_intr.c b/drivers/net/mlx4/mlx4_intr.c
index b17d109a..50d19769 100644
--- a/drivers/net/mlx4/mlx4_intr.c
+++ b/drivers/net/mlx4/mlx4_intr.c
@@ -98,7 +98,7 @@ mlx4_rx_intr_vec_enable(struct priv *priv)
struct rte_intr_handle *intr_handle = &priv->intr_handle;
mlx4_rx_intr_vec_disable(priv);
- intr_handle->intr_vec = malloc(sizeof(intr_handle->intr_vec[rxqs_n]));
+ intr_handle->intr_vec = malloc(n * sizeof(intr_handle->intr_vec[0]));
if (intr_handle->intr_vec == NULL) {
rte_errno = ENOMEM;
ERROR("failed to allocate memory for interrupt vector,"