Skip to content

Commit

Permalink
bnx2x: Prevent memory leak when cnic is absent
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yuval Mintz authored and David S. Miller committed May 1, 2013
1 parent b026192 commit 0595224
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -7774,6 +7774,8 @@ void bnx2x_free_mem(struct bnx2x *bp)
BNX2X_PCI_FREE(bp->eq_ring, bp->eq_mapping,
BCM_PAGE_SIZE * NUM_EQ_PAGES);

BNX2X_PCI_FREE(bp->t2, bp->t2_mapping, SRC_T2_SZ);

bnx2x_iov_free_mem(bp);
}

Expand Down

0 comments on commit 0595224

Please sign in to comment.