Re: [PATCH 1/2] mm: vmpressure: don't need call kfree if kstrndup fails

From: David Rientjes
Date: Tue Feb 11 2020 - 21:07:48 EST


On Tue, 11 Feb 2020, Yang Shi wrote:

> When kstrndup fails (returns NULL) there is no memory is allocated by
> kmalloc, so no need to call kfree().
>
> Signed-off-by: Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx>

Acked-by: David Rientjes <rientjes@xxxxxxxxxx>