NFC: digital: fix possible memory leak in digital_tg_listen_mdaa()
'params' is allocated in digital_tg_listen_mdaa(), but not free when digital_send_cmd() failed, which will cause memory leak. Fix it by freeing 'params' if digital_send_cmd() return failed. Fixes: 1c7a4c24 ("NFC Digital: Add target NFC-DEP support") Signed-off-by: NZiyang Xuan <william.xuanziyang@huawei.com> Reviewed-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
Showing
想要评论请 注册 或 登录