Skip to content

Commit

Permalink
[PATCH] hostap: Fix double free in prism2_config() error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eugene Teo authored and John W. Linville committed Mar 23, 2006
1 parent 54b85f4 commit 8abceaf
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/wireless/hostap/hostap_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8abceaf

Please sign in to comment.