mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-24 07:46:48 +00:00
ath5k: add an upstream patch to fix a memory leak
SVN-Revision: 27432
This commit is contained in:
parent
4d8b9fafcb
commit
f9202745b9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user