Skip to content
Commit 8f79ded9 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Samuel Ortiz
Browse files

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent ca42fb9e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment