summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtlwifi/rtl8192de
diff options
context:
space:
mode:
authorSouptick Joarder <jrdr.linux@gmail.com>2017-07-05 17:25:06 +0300
committerKalle Valo <kvalo@codeaurora.org>2017-07-28 18:42:25 +0300
commitf2764f61fa10593204b0c5e4e9a68dba02112e50 (patch)
tree42c3ef23214e3fa4f8134ca0ba0f6967e628c17a /drivers/net/wireless/realtek/rtlwifi/rtl8192de
parent4de95fc5fa1192b6c4d89545b6a788cc6de97429 (diff)
downloadlinux-f2764f61fa10593204b0c5e4e9a68dba02112e50.tar.xz
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/rtl8192de')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c
index 16132c66e5e1..e38d6f7370aa 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c
@@ -183,6 +183,8 @@ static int rtl92d_init_sw_vars(struct ieee80211_hw *hw)
rtl_fw_cb);
if (err) {
pr_err("Failed to request firmware!\n");
+ vfree(rtlpriv->rtlhal.pfirmware);
+ rtlpriv->rtlhal.pfirmware = NULL;
return 1;
}