iwl4965: Fix more memory leaks in __il4965_up()
authorJulian Calaby <julian.calaby@gmail.com>
Fri, 18 Mar 2016 02:29:11 +0000 (13:29 +1100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 7 Apr 2016 16:37:50 +0000 (19:37 +0300)
commit84d17a2a5a0f9e19e25d0472f0528996d945826e
tree81280c305fe55e46481738fccabd0bba9858bead
parentc2fd34469d1623111e3c3db65cde533f3bddc26e
iwl4965: Fix more memory leaks in __il4965_up()

In some of the non-success return paths, the memory allocated by
iwl4965_sta_alloc_lq() in iwl4965_alloc_bcast_station() is not freed.

In particular:
 - if the card isn't ready after il4965_prepare_card_hw()
 - if the card is hardware-rfkilled

In the hardware rfkilled path, the driver enables the rfkill
interrupt. When the card is unrfkilled and this interrupt is raised
we end up calling il4965_bg_restart() which calls __il4965_up() which
calls iwl4965_alloc_bcast_station() again.

Suggested-by: Jia-Ju Bai <baijiaju1990@163.com>
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/intel/iwlegacy/4965-mac.c