ping
On Wed, Nov 28, 2018 at 9:56 PM Tonghao Zhang <xiangxia.m....@gmail.com> wrote:
>
> In some case, we may create sched port dynamically,
> if err when creating so memory will leak.
>
> Signed-off-by: Tonghao Zhang <xiangxia.m....@gmail.com>
> ---
>  lib/librte_sched/rte_sched.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
> index 17de6e6..a3adcca 100644
> --- a/lib/librte_sched/rte_sched.c
> +++ b/lib/librte_sched/rte_sched.c
> @@ -724,6 +724,7 @@ struct rte_sched_port *
>                                     bmp_mem_size);
>         if (port->bmp == NULL) {
>                 RTE_LOG(ERR, SCHED, "Bitmap init error\n");
> +               rte_free(port);
>                 return NULL;
>         }
>
> --
> 1.8.3.1
>

Reply via email to