aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/r8188eu
diff options
context:
space:
mode:
authorXiangyang Zhang <xyz.sun.ok@gmail.com>2021-08-21 16:18:24 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-26 12:17:51 +0200
commit2d29f81ce82208626f4278d6aa9faa5547c5bf02 (patch)
treeae40bd396110f521f9b43ee427361f2f340ae106 /drivers/staging/r8188eu
parentstaging: r8188eu: set pipe only once (diff)
downloadlinux-dev-2d29f81ce82208626f4278d6aa9faa5547c5bf02.tar.xz
linux-dev-2d29f81ce82208626f4278d6aa9faa5547c5bf02.zip
staging: r8188eu: Fix a resource leak in update_bcn_wps_ie
The "pbackup_remainder_ie" variable is not freed when "pwps_ie_src" is null Fixes: 15865124feed ("staging: r8188eu: introduce new core dir for RTL8188eu driver") Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Xiangyang Zhang <xyz.sun.ok@gmail.com> Link: https://lore.kernel.org/r/20210821081824.14745-1-xyz.sun.ok@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/r8188eu')
-rw-r--r--drivers/staging/r8188eu/core/rtw_ap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_ap.c b/drivers/staging/r8188eu/core/rtw_ap.c
index 41b5668d080b..1c07ad28b242 100644
--- a/drivers/staging/r8188eu/core/rtw_ap.c
+++ b/drivers/staging/r8188eu/core/rtw_ap.c
@@ -1199,7 +1199,7 @@ static void update_bcn_wps_ie(struct adapter *padapter)
pwps_ie_src = pmlmepriv->wps_beacon_ie;
if (!pwps_ie_src)
- return;
+ goto exit;
wps_ielen = (uint)pwps_ie_src[1];/* to get ie data len */
if ((wps_offset + wps_ielen + 2 + remainder_ielen) <= MAX_IE_SZ) {
@@ -1213,6 +1213,7 @@ static void update_bcn_wps_ie(struct adapter *padapter)
pnetwork->IELength = wps_offset + (wps_ielen + 2) + remainder_ielen;
}
+exit:
kfree(pbackup_remainder_ie);
}