2017-04-01 22:19:19

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [PATCH] NFC: st21nfca: Fix potential memory leak

Hi Christophe,

On Sun, Feb 19, 2017 at 10:58:47AM +0100, Christophe JAILLET wrote:
> If all bits of 'dev_mask' are already set, there is a memory leak because
> 'info' should be freed before returning.
>
> While fixing it, 'return -ENOMEM' directly if the first kzalloc fails.
> This makes the code more readable.
>
> Signed-off-by: Christophe JAILLET <[email protected]>
> ---
> drivers/nfc/st21nfca/core.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
Applied, thanks.

Cheers,
Samuel.