]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
ath5k: Fix double free on hw attach error path
authorJones Desougi <jones.desougi@27m.se>
Wed, 27 Oct 2010 17:38:34 +0000 (19:38 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 27 Oct 2010 19:54:54 +0000 (15:54 -0400)
commit3d435ad7218ff58c846d7e52d87c2daf115f50cd
tree67d70141b5d7df2c4194231bed3ec1430771bcc5
parentdc9f48ce7c7d345be31208def51572a8250a4a03
ath5k: Fix double free on hw attach error path

If ath5k_hw_attach fails it will free sc->ah (local variable ah) before
returning. However, when it reports failure the caller (ath5k_pci_probe)
will also free sc->ah. Let the caller handle the deallocation, it does
so on further errors as well.

Signed-off-by: Jones Desougi <jones.desougi@27m.se>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/attach.c