Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dae98cad authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller
Browse files

bnx2x: Fix possible memory leak on iov error flow



Commit 2dc33bbc "bnx2x: Remove the sriov VFOP mechanism" introduced a possible
memory leak on the error flow during multicast filters configuration.

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b5893a08
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
	}