diff options
author | Souptick Joarder <jrdr.linux@gmail.com> | 2017-07-05 17:25:06 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-07-28 18:42:25 +0300 |
commit | f2764f61fa10593204b0c5e4e9a68dba02112e50 (patch) | |
tree | 42c3ef23214e3fa4f8134ca0ba0f6967e628c17a /drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | |
parent | 4de95fc5fa1192b6c4d89545b6a788cc6de97429 (diff) | |
download | linux-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/rtl8192ce/sw.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c index bcbb0c60f1f1..38f85bfdf0c7 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c @@ -176,6 +176,8 @@ int rtl92c_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; } |