Commit 3147cf59 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aba12e3f
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment