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

Commit f08ad06c authored by Eugenia Emantayev's avatar Eugenia Emantayev Committed by David S. Miller
Browse files

mlx4_core: fix memory leak at multi_func_cleanup



Perform cleanup also in non-master flow.
The VFs use communication channel as well.

Signed-off-by: default avatarEugenia Emantayev <eugenia@mellanox.co.il>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b530b193
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1616,13 +1616,13 @@ void mlx4_multi_func_cleanup(struct mlx4_dev *dev)
				kfree(priv->mfunc.master.slave_state[i].vlan_filter[port]);
		}
		kfree(priv->mfunc.master.slave_state);
	}

	iounmap(priv->mfunc.comm);
	dma_free_coherent(&(dev->pdev->dev), PAGE_SIZE,
						     priv->mfunc.vhcr,
						     priv->mfunc.vhcr_dma);
		     priv->mfunc.vhcr, priv->mfunc.vhcr_dma);
	priv->mfunc.vhcr = NULL;
}
}

void mlx4_cmd_cleanup(struct mlx4_dev *dev)
{