aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-07-04 03:02:52 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-07-04 03:02:52 +0000
commitf9202745b9e5f7ffd65e6b01815dd38f2484c71e (patch)
treec7336f9e1d308c75e082de23a3b2987bb9b3086b
parent4d8b9fafcb1eab4571a1c82336ca89f8f001bc58 (diff)
downloadupstream-f9202745b9e5f7ffd65e6b01815dd38f2484c71e.tar.gz
upstream-f9202745b9e5f7ffd65e6b01815dd38f2484c71e.tar.bz2
upstream-f9202745b9e5f7ffd65e6b01815dd38f2484c71e.zip
ath5k: add an upstream patch to fix a memory leak
SVN-Revision: 27432
-rw-r--r--package/mac80211/patches/300-pending_work.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch
index 0900596dc9..285ce69449 100644
--- a/package/mac80211/patches/300-pending_work.patch
+++ b/package/mac80211/patches/300-pending_work.patch
@@ -461,3 +461,23 @@
void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx);
#endif /* AR9003_PHY_H */
+--- a/drivers/net/wireless/ath/ath5k/eeprom.c
++++ b/drivers/net/wireless/ath/ath5k/eeprom.c
+@@ -691,14 +691,12 @@ ath5k_eeprom_free_pcal_info(struct ath5k
+ if (!chinfo[pier].pd_curves)
+ continue;
+
+- for (pdg = 0; pdg < ee->ee_pd_gains[mode]; pdg++) {
++ for (pdg = 0; pdg < AR5K_EEPROM_N_PD_CURVES; pdg++) {
+ struct ath5k_pdgain_info *pd =
+ &chinfo[pier].pd_curves[pdg];
+
+- if (pd != NULL) {
+- kfree(pd->pd_step);
+- kfree(pd->pd_pwr);
+- }
++ kfree(pd->pd_step);
++ kfree(pd->pd_pwr);
+ }
+
+ kfree(chinfo[pier].pd_curves);