diff options
author | Yuval Mintz <Yuval.Mintz@qlogic.com> | 2014-03-27 13:46:37 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-28 16:18:02 -0400 |
commit | dae98cadf743daa480c357b7ba4410423c5f905f (patch) | |
tree | 4bf6764549f54e4700e483f1a16a687c82f2ed30 /drivers/net/ethernet | |
parent | b5893a08812602de164fa5ac6494f84df8d09a4f (diff) | |
download | talos-op-linux-dae98cadf743daa480c357b7ba4410423c5f905f.tar.gz talos-op-linux-dae98cadf743daa480c357b7ba4410423c5f905f.zip |
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@oracle.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c index df1507288b3c..5c523b32db70 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; } |