Commit 9788ba20 authored by Martin Faltesek's avatar Martin Faltesek Committed by Zheng Zengkai
Browse files

nfc: st21nfca: fix memory leaks in EVT_TRANSACTION handling

stable inclusion
from stable-v5.10.122
commit 54423649bc0ed464b75807a7cf2857a5871f738f
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5W6OE

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=54423649bc0ed464b75807a7cf2857a5871f738f



--------------------------------

commit 996419e0 upstream.

Error paths do not free previously allocated memory. Add devm_kfree() to
those failure paths.

Fixes: 26fc6c7f ("NFC: st21nfca: Add HCI transaction event support")
Fixes: 4fbcc1a4 ("nfc: st21nfca: Fix potential buffer overflows in EVT_TRANSACTION")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMartin Faltesek <mfaltesek@google.com>
Reviewed-by: default avatarGuenter Roeck <groeck@chromium.org>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent 70105551
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment