Browse Source

Staging: vt6655: add missing free_netdev() on error in hostap_enable_hostapd()

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

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun 12 years ago
parent
commit
3147cf59d1
1 changed files with 2 additions and 0 deletions
  1. 2 0
      drivers/staging/vt6655/hostap.c

+ 2 - 0
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;
 	}