Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8abceaf1 authored by Eugene Teo's avatar Eugene Teo Committed by John W. Linville
Browse files

[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: default avatarEugene Teo <eugene.teo@eugeneteo.net>
Signed-off-by: default avatarJouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 54b85f48
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;
	}