diff options
author | Jia-Ju Bai | 2016-03-18 03:28:33 +0100 |
---|---|---|
committer | Kalle Valo | 2016-04-07 18:37:49 +0200 |
commit | c2fd34469d1623111e3c3db65cde533f3bddc26e (patch) | |
tree | fbc0b346270c3dee4fbda788be89f23af0131d6f /drivers/net/wireless/intel | |
parent | rsi: Move variable initialisation into error code (diff) | |
download | kernel-qcow2-linux-c2fd34469d1623111e3c3db65cde533f3bddc26e.tar.gz kernel-qcow2-linux-c2fd34469d1623111e3c3db65cde533f3bddc26e.tar.xz kernel-qcow2-linux-c2fd34469d1623111e3c3db65cde533f3bddc26e.zip |
iwl4965: Fix a memory leak in error handling code of __il4965_up
When il4965_hw_nic_init in __il4965_up fails, the memory allocated by
iwl4965_sta_alloc_lq in iwl4965_alloc_bcast_station is not freed.
This patches adds il_dealloc_bcast_stations in the error handling code of
__il4965_up to fix this problem.
This patch has been tested in real device, and it actually fixes the bug.
Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/intel')
-rw-r--r-- | drivers/net/wireless/intel/iwlegacy/4965-mac.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c index b75f4ef3cdc7..30d9dd3dda53 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c @@ -5577,6 +5577,7 @@ __il4965_up(struct il_priv *il) ret = il4965_hw_nic_init(il); if (ret) { IL_ERR("Unable to init nic\n"); + il_dealloc_bcast_stations(il); return ret; } |