diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-11-05 18:27:40 +0000 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2019-11-05 22:19:53 -0800 |
commit | 8b3f2eb038d3098b37715afced1e62bbc72da90f (patch) | |
tree | 3843e7ff739a9b285827d9a085bd3ec5be3ee345 /drivers/net/ethernet/mellanox | |
parent | IB/mlx5: Introduce and use mlx5_core_is_vf() (diff) | |
download | linux-dev-8b3f2eb038d3098b37715afced1e62bbc72da90f.tar.xz linux-dev-8b3f2eb038d3098b37715afced1e62bbc72da90f.zip |
net/mlx5: fix kvfree of uninitialized pointer spec
Currently when a call to esw_vport_create_legacy_ingress_acl_group
fails the error exit path to label 'out' will cause a kvfree on the
uninitialized pointer spec. Fix this by ensuring pointer spec is
initialized to NULL to avoid this issue.
Addresses-Coverity: ("Uninitialized pointer read")
Fixes: 10652f39943e ("net/mlx5: Refactor ingress acl configuration")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c index 24c2217a4ce8..48627472a691 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c @@ -1253,7 +1253,7 @@ static int esw_vport_ingress_config(struct mlx5_eswitch *esw, struct mlx5_flow_destination drop_ctr_dst = {0}; struct mlx5_flow_destination *dst = NULL; struct mlx5_flow_act flow_act = {0}; - struct mlx5_flow_spec *spec; + struct mlx5_flow_spec *spec = NULL; int dest_num = 0; int err = 0; u8 *smac_v; |