mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
b5893a0881
commit
dae98cadf7
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue