sched: fix subport freeing
authorHrvoje Habjanic <hrvoje.habjanic@zg.ht.hr>
Tue, 26 May 2020 17:24:55 +0000 (19:24 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 24 Jun 2020 22:43:28 +0000 (00:43 +0200)
In function rte_sched_subport_free, 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.

Fixes: d9213b829a31 ("sched: remove pipe params config from port level")
Cc: stable@dpdk.org
Signed-off-by: Hrvoje Habjanic <hrvoje.habjanic@zg.ht.hr>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
lib/librte_sched/rte_sched.c

index c0983dd..f15a3b5 100644 (file)
@@ -888,7 +888,7 @@ rte_sched_subport_free(struct rte_sched_port *port,
                }
        }
 
-       rte_bitmap_free(subport->bmp);
+       rte_free(subport);
 }
 
 void