[dpdk-dev,v2,2/2] mempool/dpaa2: fix the incorrect free usages for bplist

Message ID 1498135688-3853-2-git-send-email-hemant.agrawal@nxp.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Hemant Agrawal June 22, 2017, 12:48 p.m. UTC
  The dpaa2_bp_list is being allocated using "rte_malloc",
but the free is done using "free". Fixing it to use
"rte_free".

Fixes: 5dc43d22b5ad ("mempool/dpaa2: add hardware offloaded mempool")
CC: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Olivier Matz July 10, 2017, 8:11 a.m. UTC | #1
On Thu, 22 Jun 2017 18:18:08 +0530, Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
> The dpaa2_bp_list is being allocated using "rte_malloc",
> but the free is done using "free". Fixing it to use
> "rte_free".
> 
> Fixes: 5dc43d22b5ad ("mempool/dpaa2: add hardware offloaded mempool")
> CC: stable@dpdk.org
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
  
Shreyansh Jain July 18, 2017, 2:46 p.m. UTC | #2
On Thursday 22 June 2017 06:18 PM, Hemant Agrawal wrote:
> The dpaa2_bp_list is being allocated using "rte_malloc",
> but the free is done using "free". Fixing it to use
> "rte_free".
> 
> Fixes: 5dc43d22b5ad ("mempool/dpaa2: add hardware offloaded mempool")
> CC: stable@dpdk.org
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---

Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
  

Patch

diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index 27ed5a9..62a2d25 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -161,7 +161,7 @@  rte_hw_mbuf_free_pool(struct rte_mempool *mp)
 		while (temp) {
 			if (temp == bp) {
 				prev->next = temp->next;
-				free(bp);
+				rte_free(bp);
 				break;
 			}
 			prev = temp;