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 3FBADA04A4; Tue, 26 May 2020 19:25:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 763F31D62F; Tue, 26 May 2020 19:25:05 +0200 (CEST) Received: from ls405.t-com.hr (ls405.t-com.hr [195.29.150.135]) by dpdk.org (Postfix) with ESMTP id 1E9421D5FA for ; Tue, 26 May 2020 19:25:04 +0200 (CEST) Received: from ls266.t-com.hr (ls266.t-com.hr [195.29.150.94]) by ls405.t-com.hr (Postfix) with ESMTP id D191F69834A for ; Tue, 26 May 2020 19:25:03 +0200 (CEST) Received: from ls266.t-com.hr (localhost.localdomain [127.0.0.1]) by ls266.t-com.hr (Qmlai) with ESMTP id CB05CC58244 for ; Tue, 26 May 2020 19:25:03 +0200 (CEST) X-Envelope-Sender: hrvoje.habjanic@zg.ht.hr Received: from habix.doma (93-138-47-86.adsl.net.t-com.hr [93.138.47.86]) by ls266.t-com.hr (Qmali) with ESMTP id 8857712020C for ; Tue, 26 May 2020 19:25:03 +0200 (CEST) Received: from habi-doma.doma (habi-doma.doma [192.168.10.192]) by habix.doma (Postfix) with ESMTPA id 6C1E8C4 for ; Tue, 26 May 2020 19:25:03 +0200 (CEST) From: Hrvoje Habjanic To: dev@dpdk.org Date: Tue, 26 May 2020 19:24:55 +0200 Message-Id: <20200526172455.6457-1-hrvoje.habjanic@zg.ht.hr> X-Mailer: git-send-email 2.17.1 X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-25444.000 X-TM-AS-Result: No--4.722-10.0-31-1 X-imss-scan-details: No--4.722-10.0-31-1 X-TM-AS-User-Approved-Sender: No Subject: [dpdk-dev] [PATCH] rte_sched: correctly free allocated subport memory 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" In function rte_sched_subport_free (lib/librte_sched/rte_sched.c, line 865), there is code to free all allocated stuff related to scheduler subport. First there are some checks, and in the end, rte_bitmap_free is called. Now, rte_bitmap_free is a dummy function, and it just checks if provided pointer to bitmap is valid or not. So, actual memory for subport is not freed. This patch fixes this by removing call to rte_bitmap_free, and instead calling rte_free. Signed-off-by: Hrvoje Habjanic --- lib/librte_sched/rte_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c index c0983ddda..f15a3b515 100644 --- a/lib/librte_sched/rte_sched.c +++ b/lib/librte_sched/rte_sched.c @@ -888,7 +888,7 @@ rte_sched_subport_free(struct rte_sched_port *port, } } - rte_bitmap_free(subport->bmp); + rte_free(subport); } void -- 2.17.1