net/bnx2x: fix memory leak

bnx2x_free_hsi_mem() does not free DMA memory.
Fix it here.

Fixes: 540a211084 ("bnx2x: driver core")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
This commit is contained in:
Shahed Shaikh 2019-06-04 11:53:50 -07:00 committed by Ferruh Yigit
parent f0219d98de
commit 0cf8fdce99

View File

@ -9018,36 +9018,42 @@ void bnx2x_free_hsi_mem(struct bnx2x_softc *sc)
/*******************/ /*******************/
memset(&fp->status_block, 0, sizeof(fp->status_block)); memset(&fp->status_block, 0, sizeof(fp->status_block));
bnx2x_dma_free(&fp->sb_dma);
} }
/***************************/ /***************************/
/* FW DECOMPRESSION BUFFER */ /* FW DECOMPRESSION BUFFER */
/***************************/ /***************************/
bnx2x_dma_free(&sc->gz_buf_dma);
sc->gz_buf = NULL; sc->gz_buf = NULL;
/*******************/ /*******************/
/* SLOW PATH QUEUE */ /* SLOW PATH QUEUE */
/*******************/ /*******************/
bnx2x_dma_free(&sc->spq_dma);
sc->spq = NULL; sc->spq = NULL;
/*************/ /*************/
/* SLOW PATH */ /* SLOW PATH */
/*************/ /*************/
bnx2x_dma_free(&sc->sp_dma);
sc->sp = NULL; sc->sp = NULL;
/***************/ /***************/
/* EVENT QUEUE */ /* EVENT QUEUE */
/***************/ /***************/
bnx2x_dma_free(&sc->eq_dma);
sc->eq = NULL; sc->eq = NULL;
/************************/ /************************/
/* DEFAULT STATUS BLOCK */ /* DEFAULT STATUS BLOCK */
/************************/ /************************/
bnx2x_dma_free(&sc->def_sb_dma);
sc->def_sb = NULL; sc->def_sb = NULL;
} }