summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-07-03 12:37:46 +0300
committerDavid S. Miller <davem@davemloft.net>2013-07-03 16:52:10 -0700
commit9caf83c32be1dabf000ab7dc8430fba4f7d89e65 (patch)
tree9f3165fae87e5960fb310b4a2def8f67b2d3021b
parent4bc41b84e9b4d904f68cba2dbe0c60a5428c27c4 (diff)
downloadop-kernel-dev-9caf83c32be1dabf000ab7dc8430fba4f7d89e65.zip
op-kernel-dev-9caf83c32be1dabf000ab7dc8430fba4f7d89e65.tar.gz
net/mlx4: fix small memory leak on error
"work" needs to be freed before returning on this error path. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/cmd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c
index 707a7d0..299d018 100644
--- a/drivers/net/ethernet/mellanox/mlx4/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c
@@ -1572,6 +1572,7 @@ int mlx4_master_immediate_activate_vlan_qos(struct mlx4_priv *priv,
vp_admin->default_vlan,
&admin_vlan_ix);
if (err) {
+ kfree(work);
mlx4_warn((&priv->dev),
"No vlan resources slave %d, port %d\n",
slave, port);
OpenPOWER on IntegriCloud