]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtl8712: Fix a possible NULL pointer dereference in function r8712_joinbss_e...
authorLee Gibson <leegib@gmail.com>
Fri, 19 Mar 2021 08:58:36 +0000 (08:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Mar 2021 12:40:15 +0000 (13:40 +0100)
commitf128a06e3708244693517ebc5f27ba252061cd0b
tree93cacf9b50d6cc8ed02a44861268467868e77c71
parentc4d001817da668107e662f3b173ea0141f6874cc
staging: rtl8712: Fix a possible NULL pointer dereference in function r8712_joinbss_event_callback

GCC 10 analyzer reports a warning: dereference of NULL
The function r8712_find_network can return NULL and is usually checked but
no check is present is this case.
Fix by adding the check.

Signed-off-by: Lee Gibson <leegib@gmail.com>
Link: https://lore.kernel.org/r/20210319085836.8259-1-leegib@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_mlme.c