ath5k: fix memory leak when fewer than N_PD_CURVES are in use
commit15f13f94ff3e34b02615c339ba77d1b79ba83054
authorEugene A. Shatokhin <dame_eugene@mail.ru>
Wed, 29 Jun 2011 03:04:51 +0000 (28 23:04 -0400)
committerAndi Kleen <ak@linux.intel.com>
Mon, 1 Aug 2011 20:54:57 +0000 (1 13:54 -0700)
treea92e392be3a168c82735a30a82f72e3492cf31c3
parent50a771dfdad39b55910eb18c08c8a789b1281a59
ath5k: fix memory leak when fewer than N_PD_CURVES are in use

commit a0b8de350be458b33248e48b2174d9af8a4c4798 upstream.

We would free the proper number of curves, but in the wrong
slots, due to a missing level of indirection through
the pdgain_idx table.

It's simpler just to try to free all four slots, so do that.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
drivers/net/wireless/ath/ath5k/eeprom.c