summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Teo2006-03-20 04:21:46 +0100
committerJohn W. Linville2006-03-23 22:16:57 +0100
commit8abceaf1cf44b9d95bcc366fa277b33e292141c4 (patch)
tree42d669e650bf3891c76f9aefa5f749c60e81a242
parent[PATCH] hostap: Fix ap_add_sta() return value verification (diff)
downloadkernel-qcow2-linux-8abceaf1cf44b9d95bcc366fa277b33e292141c4.tar.gz
kernel-qcow2-linux-8abceaf1cf44b9d95bcc366fa277b33e292141c4.tar.xz
kernel-qcow2-linux-8abceaf1cf44b9d95bcc366fa277b33e292141c4.zip
[PATCH] hostap: Fix double free in prism2_config() error path
The Coverity checker (CID: 930) spotted this double free on error path (allocation failure). Do not free these here since generic error path will take care of this. Signed-off-by: Eugene Teo <eugene.teo@eugeneteo.net> Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index f8f4503475f9..d335b250923a 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -585,8 +585,6 @@ static int prism2_config(dev_link_t *link)
parse = kmalloc(sizeof(cisparse_t), GFP_KERNEL);
hw_priv = kmalloc(sizeof(*hw_priv), GFP_KERNEL);
if (parse == NULL || hw_priv == NULL) {
- kfree(parse);
- kfree(hw_priv);
ret = -ENOMEM;
goto failed;
}