aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_sched/rte_sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_sched/rte_sched.c')
-rw-r--r--lib/librte_sched/rte_sched.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
index 587d5e60..89c3d1e7 100644
--- a/lib/librte_sched/rte_sched.c
+++ b/lib/librte_sched/rte_sched.c
@@ -667,6 +667,7 @@ rte_sched_port_config(struct rte_sched_port_params *params)
params->red_params[i][j].min_th,
params->red_params[i][j].max_th,
params->red_params[i][j].maxp_inv) != 0) {
+ rte_free(port);
return NULL;
}
}
@@ -726,6 +727,7 @@ rte_sched_port_config(struct rte_sched_port_params *params)
bmp_mem_size);
if (port->bmp == NULL) {
RTE_LOG(ERR, SCHED, "Bitmap init error\n");
+ rte_free(port);
return NULL;
}