diff mbox

mwifiex: fix leak of gen_ie storage on exit from mwifiex_del_mgmt_ies

Message ID 1435346976-29030-1-git-send-email-linville@tuxdriver.com (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

John W. Linville June 26, 2015, 7:29 p.m. UTC
Storage pointed to by gen_ie is allocated with kmalloc, but was
never freed.

Coverity CID #1271251

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/wireless/mwifiex/ie.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Amitkumar Karwar July 3, 2015, 7:36 a.m. UTC | #1
Hi John,

> From: John W. Linville [mailto:linville@tuxdriver.com]
> Sent: Saturday, June 27, 2015 1:00 AM
> To: linux-wireless@vger.kernel.org
> Cc: Amitkumar Karwar; Nishant Sarmukadam; Kalle Valo; John W. Linville
> Subject: [PATCH] mwifiex: fix leak of gen_ie storage on exit from
> mwifiex_del_mgmt_ies
> 
> Storage pointed to by gen_ie is allocated with kmalloc, but was never
> freed.
> 
> Coverity CID #1271251
> 
> Signed-off-by: John W. Linville <linville@tuxdriver.com>

Acked-by: Amitkumar Karwar <akarwar@marvell.com>

Regards,
Amitkumar
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kalle Valo July 21, 2015, 1:50 p.m. UTC | #2
> Storage pointed to by gen_ie is allocated with kmalloc, but was
> never freed.
> 
> Coverity CID #1271251
> 
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> Acked-by: Amitkumar Karwar <akarwar@marvell.com>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/mwifiex/ie.c b/drivers/net/wireless/mwifiex/ie.c
index 23e368c77c08..abf52d25b981 100644
--- a/drivers/net/wireless/mwifiex/ie.c
+++ b/drivers/net/wireless/mwifiex/ie.c
@@ -479,6 +479,7 @@  int mwifiex_del_mgmt_ies(struct mwifiex_private *priv)
 						   ar_ie, &priv->assocresp_idx);
 
 done:
+	kfree(gen_ie);
 	kfree(beacon_ie);
 	kfree(pr_ie);
 	kfree(ar_ie);