sched: fix profile allocation failure handling
authorHuisong Li <lihuisong@huawei.com>
Fri, 23 Apr 2021 11:01:11 +0000 (19:01 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Sat, 24 Jul 2021 08:58:39 +0000 (10:58 +0200)
commita042481ecd9e890b7fc088f9d2a3a6b6e82d3a4c
tree8df1b21b2dc043a264e5afcf499f2e640b69d249
parentd37462e56ceee7eaf6321ab42c4d2558708183c1
sched: fix profile allocation failure handling

This patch fixes return value judgment when allocate memory to store the
subport profile, and releases memory of 'rte_sched_port' if code fails to
apply for this memory.

Fixes: 0ea4c6afcaf1 ("sched: add subport profile table")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
lib/sched/rte_sched.c