From 2d02781c7ad90cd68dd0a05ce3323b2b0d8a991c Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Wed, 11 Jul 2018 07:38:45 +0100 Subject: [PATCH] compress/isal: set null pointer after freeing Fixes: b0e23c458a6f ("compress/isal: add queue pair related ops") Cc: stable@dpdk.org Signed-off-by: Pablo de Lara Acked-by: Lee Daly --- drivers/compress/isal/isal_compress_pmd_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c b/drivers/compress/isal/isal_compress_pmd_ops.c index 585f22802d..0738fb9c46 100644 --- a/drivers/compress/isal/isal_compress_pmd_ops.c +++ b/drivers/compress/isal/isal_compress_pmd_ops.c @@ -167,8 +167,8 @@ isal_comp_pmd_qp_release(struct rte_compressdev *dev, uint16_t qp_id) if (qp->state != NULL) rte_free(qp->state); - if (dev->data->queue_pairs[qp_id] != NULL) - rte_free(dev->data->queue_pairs[qp_id]); + rte_free(qp); + dev->data->queue_pairs[qp_id] = NULL; return 0; } -- 2.20.1