[PATCH v5] sched: remove useless malloc in pie data init

Thomas Monjalon thomas at monjalon.net
Mon Mar 7 19:35:07 CET 2022


01/03/2022 21:32, Weiguo Li:
> 'rte_pie_rt_data_init(NULL)' is not expected, and it's ought to
> fail when this happen. The malloc inside the function didn't work.
> So remove the malloc otherwise will lead to a memory leak.
> 
> Fixes: 44c730b0e37971 ("sched: add PIE based congestion management")
> 
> Signed-off-by: Weiguo Li <liwg06 at foxmail.com>
> Acked-by: Stephen Hemminger <stephen at networkplumber.org>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
> ---
> v5:
> * fix compile error
> v4:
> * replace all assignments to zero by a memset.
> v3:
> * fix typo
> v2:
> * revise according to Stephen's suggestion.

Applied, thanks.






More information about the dev mailing list