commit | 8f79ded95934154d4454b6e422a18a3fbcd7a268 | [log] [tgz] |
---|---|---|
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | Sun Feb 19 10:58:47 2017 +0100 |
committer | Samuel Ortiz <sameo@linux.intel.com> | Sun Apr 02 00:18:35 2017 +0200 |
tree | 3fd1d1aaf10da2b3301deca7f117a2f0426deb42 | |
parent | ca42fb9e52d155547e6cf18cf26bce3e1a6af4ea [diff] |
NFC: st21nfca: Fix potential memory leak 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> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>