Re: [PATCH] nfs: Remove unnecessary NULL check before kfree()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11 Aug 2024, at 8:18, Thorsten Blum wrote:

> Since kfree() already checks if its argument is NULL, an additional
> check before calling kfree() is unnecessary and can be removed.
>
> Remove it and thus also the following Coccinelle/coccicheck warning
> reported by ifnullfree.cocci:
>
>   WARNING: NULL check before some freeing functions is not needed
>
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxxx>

Correct, of course.

Reviewed-by: Benjamin Coddington <bcodding@xxxxxxxxxx>

Ben





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux