projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2fac971
)
iwlwifi: fix memory leak in command queue handling
author
Reinette Chatre
<
[email protected]
>
Fri, 25 Sep 2009 21:24:22 +0000
(14:24 -0700)
committer
John W. Linville
<
[email protected]
>
Mon, 28 Sep 2009 20:55:04 +0000
(16:55 -0400)
Also free the array of command pointers and meta data of each
command buffer when command queue is freed.
Signed-off-by: Reinette Chatre <
[email protected]
>
Signed-off-by: John W. Linville <
[email protected]
>
drivers/net/wireless/iwlwifi/iwl-tx.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/iwlwifi/iwl-tx.c
b/drivers/net/wireless/iwlwifi/iwl-tx.c
index a7422e52d8836f8333137b79c631f7f0d0467db9..c18907544701c6a81a31857145a29b6bc05b9129 100644
(file)
--- 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)
pci_free_consistent(dev, priv->hw_params.tfd_size *
txq->q.n_bd, txq->tfds, txq->q.dma_addr);
+ /* deallocate arrays */
+ kfree(txq->cmd);
+ kfree(txq->meta);
+ txq->cmd = NULL;
+ txq->meta = NULL;
+
/* 0-fill queue descriptor structure */
memset(txq, 0, sizeof(*txq));
}