]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtl8188eu: avoid a null dereference on pmlmepriv
authorColin Ian King <colin.king@canonical.com>
Fri, 20 Oct 2017 18:40:24 +0000 (20:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Nov 2017 11:48:55 +0000 (12:48 +0100)
commit0f3f695260f60a9eaab856c7d732a343e671117d
tree50c7925452ed2f5ba632abd926a747f443c81954
parent9194e8c370fde61cc36ea4355ab1617874abc991
staging: rtl8188eu: avoid a null dereference on pmlmepriv

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: 84088b308f40 ("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>
drivers/staging/rtl8188eu/core/rtw_mlme.c