mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
37190b2694
commit
c2fd34469d
1 changed files with 1 additions and 0 deletions
|
@ -5577,6 +5577,7 @@ __il4965_up(struct il_priv *il)
|
||||||
ret = il4965_hw_nic_init(il);
|
ret = il4965_hw_nic_init(il);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
IL_ERR("Unable to init nic\n");
|
IL_ERR("Unable to init nic\n");
|
||||||
|
il_dealloc_bcast_stations(il);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue