Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1614603
| From | Samuel Ortiz <sameo@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] NFC: st21nfca: Fix potential memory leak |
| Date | 2017-04-02 00:30 +0200 |
| Message-ID | <trzGW-gn-15@gated-at.bofh.it> (permalink) |
| References | <tcwrE-5MP-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] NFC: st21nfca: Fix potential memory leak Samuel Ortiz <sameo@linux.intel.com> - 2017-04-02 00:30 +0200
csiph-web