lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 23 May 2013 17:28:05 +0800
From:	Wei Yongjun <weiyj.lk@...il.com>
To:	forest@...ttletooquiet.net, gregkh@...uxfoundation.org,
	joe@...ches.com, hemaklnce@...il.com, marcos.souza.org@...il.com,
	peter.p.waskiewicz.jr@...el.com
Cc:	yongjun_wei@...ndmicro.com.cn, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH -next] Staging: vt6655: add missing free_netdev() on error in hostap_enable_hostapd()

From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>

Add the missing free_netdev() before return from function
hostap_enable_hostapd() in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
 drivers/staging/vt6655/hostap.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c
index 46f097d..57a08c5 100644
--- a/drivers/staging/vt6655/hostap.c
+++ b/drivers/staging/vt6655/hostap.c
@@ -104,6 +104,8 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
 	if (ret) {
 		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: register_netdevice(AP) failed!\n",
 			dev->name);
+		free_netdev(pDevice->apdev);
+		pDevice->apdev = NULL;
 		return -1;
 	}
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ