[dpdk-dev] [PATCH v3] mem: fix memory leaks of hugedir and replace snprintf

Thomas Monjalon thomas at monjalon.net
Wed Apr 18 11:00:50 CEST 2018


18/04/2018 05:09, Yangchao Zhou:
> The hugedir returned by get_hugepage_dir is allocated by strdup
>  but not released. Replace snprintf with a more suitable strlcpy.
> 
> Coverity issue: 272585
> Fixes: cb97d93e9d3b ("mem: share hugepage info primary and secondary")
> 
> Signed-off-by: Yangchao Zhou <zhouyates at gmail.com>
> Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>

There was a misunderstanding.
You replaced some snprintf which were not involved in the leaks.
But I think it's fine.

Applied, thanks





More information about the dev mailing list