]> git.baikalelectronics.ru Git - kernel.git/commit
nfc: fix potential NULL pointer deref in nfc_genl_dump_ses_done
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Thu, 9 Dec 2021 08:13:07 +0000 (09:13 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 9 Dec 2021 15:50:32 +0000 (07:50 -0800)
commitdf527b79f8805d54b464923189b2a09b5a7fb9df
treeb68402a21e402fd2405ea0a85ed9534441422047
parentffd7bd551e9166c540770f57578f12f43068a815
nfc: fix potential NULL pointer deref in nfc_genl_dump_ses_done

The done() netlink callback nfc_genl_dump_ses_done() should check if
received argument is non-NULL, because its allocation could fail earlier
in dumpit() (nfc_genl_dump_ses()).

Fixes: 8aa494f4b41c ("NFC: Add a GET_SE netlink API")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20211209081307.57337-1-krzysztof.kozlowski@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/nfc/netlink.c