From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 08E5EA0547; Wed, 28 Jul 2021 08:06:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C5A34410F9; Wed, 28 Jul 2021 08:06:00 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 306B540142; Wed, 28 Jul 2021 08:05:59 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10058"; a="298169312" X-IronPort-AV: E=Sophos;i="5.84,275,1620716400"; d="scan'208";a="298169312" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2021 23:05:56 -0700 X-IronPort-AV: E=Sophos;i="5.84,275,1620716400"; d="scan'208";a="475551334" Received: from unknown (HELO localhost.localdomain) ([10.240.183.93]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2021 23:05:54 -0700 From: dapengx.yu@intel.com To: Jasvinder Singh , Cristian Dumitrescu Cc: dev@dpdk.org, Dapeng Yu , stable@dpdk.org Date: Wed, 28 Jul 2021 14:05:39 +0800 Message-Id: <20210728060539.1350469-1-dapengx.yu@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210713082709.465481-1-dapengx.yu@intel.com> References: <20210713082709.465481-1-dapengx.yu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] net/softnic: fix memory leak as profile is freed 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 Sender: "dev" From: Dapeng Yu In function softnic_table_action_profile_free(), the memory referenced by pointer "ap" in the instance of "struct softnic_table_action_profile" is not freed. This patch fixes it. Fixes: a737dd4e5863 ("net/softnic: add table action profile") Cc: stable@dpdk.org Signed-off-by: Dapeng Yu Acked-by: Jasvinder Singh --- V2: * Reapply patch on top of main branch. * No difference from V1 --- drivers/net/softnic/rte_eth_softnic_action.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/softnic/rte_eth_softnic_action.c b/drivers/net/softnic/rte_eth_softnic_action.c index 92c744dc9a..33be9552a6 100644 --- a/drivers/net/softnic/rte_eth_softnic_action.c +++ b/drivers/net/softnic/rte_eth_softnic_action.c @@ -183,6 +183,7 @@ softnic_table_action_profile_free(struct pmd_internals *p) break; TAILQ_REMOVE(&p->table_action_profile_list, profile, node); + rte_table_action_profile_free(profile->ap); free(profile); } } -- 2.27.0