forked from Minki/linux
net/mlx5: E-Switch, Fix error flow memory leak
Fix memory leak in case query nic vport command failed.
Fixes: 81848731ff
('net/mlx5: E-Switch, Add SR-IOV (FDB) support')
Signed-off-by: Mohamad Haj Yahia <mohamad@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
831cae1dae
commit
761e205b55
@ -646,7 +646,7 @@ static void esw_update_vport_addr_list(struct mlx5_eswitch *esw,
|
||||
err = mlx5_query_nic_vport_mac_list(esw->dev, vport_num, list_type,
|
||||
mac_list, &size);
|
||||
if (err)
|
||||
return;
|
||||
goto out;
|
||||
esw_debug(esw->dev, "vport[%d] context update %s list size (%d)\n",
|
||||
vport_num, is_uc ? "UC" : "MC", size);
|
||||
|
||||
@ -674,6 +674,7 @@ static void esw_update_vport_addr_list(struct mlx5_eswitch *esw,
|
||||
addr->vport = vport_num;
|
||||
addr->action = MLX5_ACTION_ADD;
|
||||
}
|
||||
out:
|
||||
kfree(mac_list);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user