From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 46CCAA04B9; Mon, 7 Sep 2020 10:15:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 209971C0CF; Mon, 7 Sep 2020 10:15:42 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 536131C0CF; Mon, 7 Sep 2020 10:15:40 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D6027D6E; Mon, 7 Sep 2020 01:15:39 -0700 (PDT) Received: from net-arm-thunderx2-02.shanghai.arm.com (net-arm-thunderx2-02.shanghai.arm.com [10.169.210.116]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3DE563F66E; Mon, 7 Sep 2020 01:15:36 -0700 (PDT) From: Ruifeng Wang To: Bruce Richardson , Vladimir Medvedkin , Ray Kinsella , Honnappa Nagarahalli , Ruifeng Wang Cc: dev@dpdk.org, nd@arm.com, stable@dpdk.org Date: Mon, 7 Sep 2020 16:15:16 +0800 Message-Id: <20200907081518.46350-2-ruifeng.wang@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200907081518.46350-1-ruifeng.wang@arm.com> References: <20200907081518.46350-1-ruifeng.wang@arm.com> Subject: [dpdk-dev] [PATCH 1/2] lpm: fix free of data structure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" The container structure should be freed instead of rte_lpm structure after wrapping rte_lpm into internal structure __rte_lpm. Fixes: 8a9f8564e9f9 ("lpm: implement RCU rule reclamation") Cc: stable@dpdk.org Signed-off-by: Ruifeng Wang Reviewed-by: Phil Yang --- lib/librte_lpm/rte_lpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c index 757436f49..51a0ae578 100644 --- a/lib/librte_lpm/rte_lpm.c +++ b/lib/librte_lpm/rte_lpm.c @@ -268,7 +268,7 @@ rte_lpm_free(struct rte_lpm *lpm) rte_rcu_qsbr_dq_delete(internal_lpm->dq); rte_free(lpm->tbl8); rte_free(lpm->rules_tbl); - rte_free(lpm); + rte_free(internal_lpm); rte_free(te); } -- 2.17.1