summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtlwifi/rtl8192se
diff options
context:
space:
mode:
authorSouptick Joarder <jrdr.linux@gmail.com>2017-07-05 19:55:06 +0530
committerKalle Valo <kvalo@codeaurora.org>2017-07-28 18:42:25 +0300
commitf2764f61fa10593204b0c5e4e9a68dba02112e50 (patch)
tree42c3ef23214e3fa4f8134ca0ba0f6967e628c17a /drivers/net/wireless/realtek/rtlwifi/rtl8192se
parent4de95fc5fa1192b6c4d89545b6a788cc6de97429 (diff)
rtlwifi: Fix memory leak when firmware request fails
This patch will fix memory leak when firmware request fails Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/rtl8192se')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c
index 2006b09ea74f..1ec20efb9ce1 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c
@@ -216,6 +216,8 @@ static int rtl92s_init_sw_vars(struct ieee80211_hw *hw)
rtl92se_fw_cb);
if (err) {
pr_err("Failed to request firmware!\n");
+ vfree(rtlpriv->rtlhal.pfirmware);
+ rtlpriv->rtlhal.pfirmware = NULL;
return 1;
}