[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130703093746.GE1598@elgon.mountain>
Date: Wed, 3 Jul 2013 12:37:46 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: Or Gerlitz <ogerlitz@...lanox.com>,
Roland Dreier <roland@...estorage.com>,
Jack Morgenstein <jackm@....mellanox.co.il>,
Rony Efraim <ronye@...lanox.com>, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [patch -next] 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@...cle.com>
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);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists