Commit d5f9b005 authored by Xiaoming Ni's avatar Xiaoming Ni Committed by Saeed Mahameed

net/mlx5: fix kfree mismatch in indir_table.c

Memory allocated by kvzalloc() should be freed by kvfree().

Fixes: 34ca6535 ("net/mlx5: E-Switch, Indirect table infrastructur")
Signed-off-by: default avatarXiaoming Ni <nixiaoming@huawei.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 534b1204
......@@ -248,7 +248,7 @@ static int mlx5_esw_indir_table_rule_get(struct mlx5_eswitch *esw,
err_ethertype:
kfree(rule);
out:
kfree(rule_spec);
kvfree(rule_spec);
return err;
}
......@@ -328,7 +328,7 @@ static int mlx5_create_indir_recirc_group(struct mlx5_eswitch *esw,
e->recirc_cnt = 0;
out:
kfree(in);
kvfree(in);
return err;
}
......@@ -347,7 +347,7 @@ static int mlx5_create_indir_fwd_group(struct mlx5_eswitch *esw,
spec = kvzalloc(sizeof(*spec), GFP_KERNEL);
if (!spec) {
kfree(in);
kvfree(in);
return -ENOMEM;
}
......@@ -371,8 +371,8 @@ static int mlx5_create_indir_fwd_group(struct mlx5_eswitch *esw,
}
err_out:
kfree(spec);
kfree(in);
kvfree(spec);
kvfree(in);
return err;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment