diff options
author | Yuval Mintz <yuvalmin@broadcom.com> | 2013-05-01 00:27:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-01 15:07:43 -0400 |
commit | 05952246cdbf62da797323e7ce156be2e24b4d8c (patch) | |
tree | e18c333202d64be1f0a551ac26f834bed0f923d0 /drivers/net/ethernet/broadcom | |
parent | b0261926ef666142ff9f7de92622172bf1164a26 (diff) |
bnx2x: Prevent memory leak when cnic is absent
bnx2x driver allocates searcher T2 tables, but it releases that memory
during unload only released if the cnic is loaded.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index ad98c296b1a1..b4c9dea93a53 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -7774,6 +7774,8 @@ void bnx2x_free_mem(struct bnx2x *bp) | |||
7774 | BNX2X_PCI_FREE(bp->eq_ring, bp->eq_mapping, | 7774 | BNX2X_PCI_FREE(bp->eq_ring, bp->eq_mapping, |
7775 | BCM_PAGE_SIZE * NUM_EQ_PAGES); | 7775 | BCM_PAGE_SIZE * NUM_EQ_PAGES); |
7776 | 7776 | ||
7777 | BNX2X_PCI_FREE(bp->t2, bp->t2_mapping, SRC_T2_SZ); | ||
7778 | |||
7777 | bnx2x_iov_free_mem(bp); | 7779 | bnx2x_iov_free_mem(bp); |
7778 | } | 7780 | } |
7779 | 7781 | ||