[PATCH] lib: Check for the NULL pointer after calling malloc

Thomas Monjalon thomas at monjalon.net
Mon Oct 10 17:46:11 CEST 2022


07/07/2022 11:23, 835703180 at qq.com:
> From: Shiqi Liu <835703180 at qq.com>
> 
> As the possible failure of the malloc(), the not_checked and
> checked could be NULL pointer.
> Therefore, it should be better to check it in order to avoid
> the dereference of the NULL pointer.
> 
> Fixes: fa8054c8c88 ("lib/node: add ethdev control")
> Signed-off-by: Shiqi Liu <835703180 at qq.com>

Removed useless braces and applied, thanks.





More information about the dev mailing list