aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2009-09-25 17:24:22 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-09-28 16:55:04 -0400
commit2814298639619b0aa994fe1aee55438f1e26a2a8 (patch)
tree3b328b313ce9867927757a337da25e1c6883811f /drivers/net
parent2fac9717a05fc4b4824422d2c439c1260807c110 (diff)
iwlwifi: fix memory leak in command queue handling
Also free the array of command pointers and meta data of each command buffer when command queue is freed. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index a7422e52d883..c18907544701 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -197,6 +197,12 @@ void iwl_cmd_queue_free(struct iwl_priv *priv)
197 pci_free_consistent(dev, priv->hw_params.tfd_size * 197 pci_free_consistent(dev, priv->hw_params.tfd_size *
198 txq->q.n_bd, txq->tfds, txq->q.dma_addr); 198 txq->q.n_bd, txq->tfds, txq->q.dma_addr);
199 199
200 /* deallocate arrays */
201 kfree(txq->cmd);
202 kfree(txq->meta);
203 txq->cmd = NULL;
204 txq->meta = NULL;
205
200 /* 0-fill queue descriptor structure */ 206 /* 0-fill queue descriptor structure */
201 memset(txq, 0, sizeof(*txq)); 207 memset(txq, 0, sizeof(*txq));
202} 208}