DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
To: lee.daly@intel.com
Cc: dev@dpdk.org, Pablo de Lara <pablo.de.lara.guarch@intel.com>,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH 2/3] compress/isal: set null pointer after freeing
Date: Wed, 11 Jul 2018 07:38:45 +0100	[thread overview]
Message-ID: <20180711063846.47189-2-pablo.de.lara.guarch@intel.com> (raw)
In-Reply-To: <20180711063846.47189-1-pablo.de.lara.guarch@intel.com>

Fixes: b0e23c458a6f ("compress/isal: add queue pair related ops")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 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 585f22802..0738fb9c4 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.14.4

  reply	other threads:[~2018-07-11 14:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11  6:38 [dpdk-dev] [PATCH 1/3] compress/isal: fix logtype name Pablo de Lara
2018-07-11  6:38 ` Pablo de Lara [this message]
2018-07-11 16:14   ` [dpdk-dev] [PATCH 2/3] compress/isal: set null pointer after freeing Daly, Lee
2018-07-11  6:38 ` [dpdk-dev] [PATCH 3/3] compress/isal: fix memory leak Pablo de Lara
2018-07-11 16:13   ` Daly, Lee
2018-07-11 16:14 ` [dpdk-dev] [PATCH 1/3] compress/isal: fix logtype name Daly, Lee
2018-07-13 14:40   ` De Lara Guarch, Pablo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180711063846.47189-2-pablo.de.lara.guarch@intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=dev@dpdk.org \
    --cc=lee.daly@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).