From: Bob Copeland <me@bobcopeland.com>
To: Tulio Magno Quites Machado Filho <tuliom@gmail.com>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>,
Nick Kossifidis <mick@madwifi-project.org>,
ath5k-devel <ath5k-devel@lists.ath5k.org>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: Thanks for TX power patch
Date: Thu, 12 Mar 2009 20:30:08 -0400 [thread overview]
Message-ID: <20090313003008.GA4188@hash.localnet> (raw)
In-Reply-To: <b6c5339f0903120714rda8ec3ev2c2fbfaaf0b21351@mail.gmail.com>
On Thu, Mar 12, 2009 at 10:14:09AM -0400, Bob Copeland wrote:
>
> kfree(pd) looks wrong, because pd_curves is the kzalloc()ed part, not
> the array elements themselves. But I tried removing that and freeing
> the pd_curves array outside of the loop and got more slab debugging
> poop. So, I punt for now.
This seems to fix it for me...
diff --git a/drivers/net/wireless/ath5k/eeprom.c b/drivers/net/wireless/ath5k/eeprom.c
index f992b1b..0b062f6 100644
--- a/drivers/net/wireless/ath5k/eeprom.c
+++ b/drivers/net/wireless/ath5k/eeprom.c
@@ -1559,17 +1559,20 @@ ath5k_eeprom_free_pcal_info(struct ath5k_hw *ah, int mode)
}
for (pier = 0; pier < ee->ee_n_piers[mode]; pier++) {
+ if (!chinfo[pier].pd_curves)
+ continue;
+
for (pdg = 0; pdg < ee->ee_pd_gains[mode]; pdg++) {
- struct ath5k_pdgain_info *pd = &chinfo->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);
}
}
+ kfree(chinfo[pier].pd_curves);
}
-
return 0;
}
--
Bob Copeland %% www.bobcopeland.com
prev parent reply other threads:[~2009-03-13 0:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-10 23:39 Thanks for TX power patch Maxim Levitsky
2009-03-11 0:12 ` Nick Kossifidis
2009-03-11 8:15 ` Tulio Magno Quites Machado Filho
2009-03-12 14:14 ` Bob Copeland
2009-03-12 21:25 ` Maxim Levitsky
2009-03-12 21:32 ` [ath5k-devel] " Bob Copeland
2009-03-12 21:33 ` Bob Copeland
2009-03-12 22:04 ` Maxim Levitsky
2009-03-13 10:38 ` Maxim Levitsky
2009-03-13 18:23 ` Bob Copeland
2009-03-13 18:29 ` Nick Kossifidis
2009-03-13 19:06 ` Maxim Levitsky
2009-03-13 0:30 ` Bob Copeland [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090313003008.GA4188@hash.localnet \
--to=me@bobcopeland.com \
--cc=ath5k-devel@lists.ath5k.org \
--cc=linux-wireless@vger.kernel.org \
--cc=maximlevitsky@gmail.com \
--cc=mick@madwifi-project.org \
--cc=tuliom@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).