From patchwork Wed Nov 9 06:29:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xing, Beilei" X-Patchwork-Id: 119595 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C579AA0093; Wed, 9 Nov 2022 07:29:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CC9C40151; Wed, 9 Nov 2022 07:29:22 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id DEF7D400D7 for ; Wed, 9 Nov 2022 07:29:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667975361; x=1699511361; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=7V+rZzntcVrT0+9r8Yqr+Cx5JXC4unkVuzu/rGSpCIg=; b=DPOFePmolGaXukcpsiWckcJLYmWn2WnTEj3KQDtpfpR0ro9NmXTUjD6l BjR2d+Q5K5gMW+/LjKxvtbYGlGj5cZTCPjnve/4smQCTeYqrpZkAIepk2 mscUSQoXYNUyDj/GPf0BXFdrNixDDb5a6f73Zb0OEUUH7rfkgqUxZieWQ UIWRu5DteU2jM2klpeEYYSmVgDA32rc6+Cg2ZJCU7Xdzor8tEU9WNA3XQ D1/JoXMKn+s9QIzFYeDAznCd+olIkzni8lRXU18bCrrlIxyl8QwMsJt1x +BfELH+1vjnqiCvfPwtPv+2vHTGWVSjg7iB4/zkcNNXYCGdUgiMGWrSEs Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10525"; a="294274891" X-IronPort-AV: E=Sophos;i="5.96,149,1665471600"; d="scan'208";a="294274891" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2022 22:29:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10525"; a="742269032" X-IronPort-AV: E=Sophos;i="5.96,149,1665471600"; d="scan'208";a="742269032" Received: from dpdk-beileix-3.sh.intel.com ([10.67.110.253]) by fmsmga002.fm.intel.com with ESMTP; 08 Nov 2022 22:29:17 -0800 From: beilei.xing@intel.com To: jingjing.wu@intel.com Cc: dev@dpdk.org, yuan.peng@intel.com, Beilei Xing Subject: [PATCH] net/idpf: fix memory leak Date: Wed, 9 Nov 2022 06:29:13 +0000 Message-Id: <20221109062913.18622-1-beilei.xing@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Beilei Xing This patch fixes memory leak during Tx split queue release. Fixes: 19b58dba9dc3 ("net/idpf: support queue release") Signed-off-by: Beilei Xing Tested-by: Peng, Yuan --- drivers/net/idpf/idpf_rxtx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/idpf/idpf_rxtx.c b/drivers/net/idpf/idpf_rxtx.c index b338a67de7..ef2fdb317d 100644 --- a/drivers/net/idpf/idpf_rxtx.c +++ b/drivers/net/idpf/idpf_rxtx.c @@ -213,7 +213,11 @@ idpf_tx_queue_release(void *txq) if (q == NULL) return; - rte_free(q->complq); + if (q->complq) { + rte_memzone_free(q->complq->mz); + rte_free(q->complq); + } + q->ops->release_mbufs(q); rte_free(q->sw_ring); rte_memzone_free(q->mz);