mwifiex: fix leak of gen_ie storage on exit from mwifiex_del_mgmt_ies
authorJohn Linville <linville@tuxdriver.com>
Fri, 26 Jun 2015 19:29:36 +0000 (15:29 -0400)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 21 Jul 2015 13:49:21 +0000 (16:49 +0300)
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mwifiex/ie.c

index 23e368c77c08bd22a37a262f47e1ad82ae07ba97..abf52d25b9815b720399221e2da00bff9381a2c9 100644 (file)
@@ -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);