Message ID | 1619175672-20016-2-git-send-email-humin29@huawei.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Thomas Monjalon |
Headers | show |
Series | bugfix for sched | expand |
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c index cd87e68..df0ab5c 100644 --- a/lib/sched/rte_sched.c +++ b/lib/sched/rte_sched.c @@ -961,9 +961,9 @@ rte_sched_port_config(struct rte_sched_port_params *params) /* Allocate memory to store the subport profile */ port->subport_profiles = rte_zmalloc_socket("subport_profile", size2, RTE_CACHE_LINE_SIZE, params->socket); - if (port == NULL) { + if (port->subport_profiles == NULL) { RTE_LOG(ERR, SCHED, "%s: Memory allocation fails\n", __func__); - + rte_free(port); return NULL; }