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: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
Showing
想要评论请 注册 或 登录