mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-08 17:49:45 +00:00
staging: rtl8188eu: avoid a null dereference on pmlmepriv
[ Upstream commit123c0aab00
] There is a check on pmlmepriv before dereferencing it when vfree'ing pmlmepriv->free_bss_buf however the previous call to rtw_free_mlme_priv_ie_data deferences pmlmepriv causing a null pointer deference if it is null. Avoid this by also calling rtw_free_mlme_priv_ie_data if the pointer is non-null. Detected by CoverityScan, CID#1230262 ("Dereference before null check") Fixes:7b464c9fa5
("staging: r8188eu: Add files for new driver - part 4") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a99611910d
commit
e3912c2aef
1 changed files with 3 additions and 3 deletions
|
@ -106,10 +106,10 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv)
|
|||
|
||||
void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
|
||||
{
|
||||
rtw_free_mlme_priv_ie_data(pmlmepriv);
|
||||
|
||||
if (pmlmepriv)
|
||||
if (pmlmepriv) {
|
||||
rtw_free_mlme_priv_ie_data(pmlmepriv);
|
||||
vfree(pmlmepriv->free_bss_buf);
|
||||
}
|
||||
}
|
||||
|
||||
struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)
|
||||
|
|
Loading…
Reference in a new issue