[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1395920797-11199-1-git-send-email-Yuval.Mintz@qlogic.com>
Date: Thu, 27 Mar 2014 13:46:37 +0200
From: Yuval Mintz <Yuval.Mintz@...gic.com>
To: <netdev@...r.kernel.org>, <davem@...emloft.net>
CC: Yuval Mintz <Yuval.Mintz@...gic.com>,
Ariel Elior <Ariel.Elior@...gic.com>
Subject: [PATCH net-next] bnx2x: Fix possible memory leak on iov error flow
Commit 2dc33bbc4 "bnx2x: Remove the sriov VFOP mechanism" introduced a possible
memory leak on the error flow during multicast filters configuration.
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@...gic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@...gic.com>
---
Hi Dave,
Please consider applying this to net-next.
Thanks,
Yuval
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
index df15072..5c523b3 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@ -595,6 +595,8 @@ int bnx2x_vf_mcast(struct bnx2x *bp, struct bnx2x_virtf *vf,
rc = bnx2x_config_mcast(bp, &mcast, BNX2X_MCAST_CMD_DEL);
if (rc) {
BNX2X_ERR("Failed to remove multicasts\n");
+ if (mc)
+ kfree(mc);
return rc;
}
--
1.8.1.4
--
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