diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-05-17 05:37:33 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-06-06 02:18:11 -0400 |
commit | 519c7c416870c6e71e9553786a529d89f55ef395 (patch) | |
tree | 31958b056a944f6efe5ba7aa7dbcdd1dc2e3dcd4 /drivers/net | |
parent | 6f80240e0a738a6c5cef005291a90522959f3ba2 (diff) |
iwlwifi: kzalloc txb array
When we allocate queues, we currently don't
use kzalloc() right now. When we then free
those queues again without having used all
entries, we may end up trying to free random
pointers found in the txb array since it was
never initialised. This fixes it simply by
using kzalloc().
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-tx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index 769136f8f321..a81989c06983 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -272,7 +272,7 @@ static int iwl_tx_queue_alloc(struct iwl_priv *priv, | |||
272 | /* Driver private data, only for Tx (not command) queues, | 272 | /* Driver private data, only for Tx (not command) queues, |
273 | * not shared with device. */ | 273 | * not shared with device. */ |
274 | if (id != IWL_CMD_QUEUE_NUM) { | 274 | if (id != IWL_CMD_QUEUE_NUM) { |
275 | txq->txb = kmalloc(sizeof(txq->txb[0]) * | 275 | txq->txb = kzalloc(sizeof(txq->txb[0]) * |
276 | TFD_QUEUE_SIZE_MAX, GFP_KERNEL); | 276 | TFD_QUEUE_SIZE_MAX, GFP_KERNEL); |
277 | if (!txq->txb) { | 277 | if (!txq->txb) { |
278 | IWL_ERR(priv, "kmalloc for auxiliary BD " | 278 | IWL_ERR(priv, "kmalloc for auxiliary BD " |