Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1614603 > unrolled thread

Re: [PATCH] NFC: st21nfca: Fix potential memory leak

Started bySamuel Ortiz <sameo@linux.intel.com>
First post2017-04-02 00:30 +0200
Last post2017-04-02 00:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] NFC: st21nfca: Fix potential memory leak Samuel Ortiz <sameo@linux.intel.com> - 2017-04-02 00:30 +0200

#1614603 — Re: [PATCH] NFC: st21nfca: Fix potential memory leak

FromSamuel Ortiz <sameo@linux.intel.com>
Date2017-04-02 00:30 +0200
SubjectRe: [PATCH] NFC: st21nfca: Fix potential memory leak
Message-ID<trzGW-gn-15@gated-at.bofh.it>
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 <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/nfc/st21nfca/core.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
Applied, thanks.

Cheers,
Samuel.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web