mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
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>
This commit is contained in:
parent
62a19328c4
commit
105949497a
1 changed files with 2 additions and 1 deletions
|
@ -728,7 +728,8 @@ void r8712_joinbss_event_callback(struct _adapter *adapter, u8 *pbuf)
|
||||||
r8712_find_network(&pmlmepriv->
|
r8712_find_network(&pmlmepriv->
|
||||||
scanned_queue,
|
scanned_queue,
|
||||||
cur_network->network.MacAddress);
|
cur_network->network.MacAddress);
|
||||||
pcur_wlan->fixed = false;
|
if (pcur_wlan)
|
||||||
|
pcur_wlan->fixed = false;
|
||||||
|
|
||||||
pcur_sta = r8712_get_stainfo(pstapriv,
|
pcur_sta = r8712_get_stainfo(pstapriv,
|
||||||
cur_network->network.MacAddress);
|
cur_network->network.MacAddress);
|
||||||
|
|
Loading…
Reference in a new issue