Avoid crash after driver init failure
hostapd_flush_old_stations() needs to check whether the driver initialization was successful since it gets called on an error path.
This commit is contained in:
parent
7ab68865c0
commit
70a8419f26
1 changed files with 1 additions and 1 deletions
|
@ -299,7 +299,7 @@ static int hostapd_flush_old_stations(struct hostapd_data *hapd)
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
if (hostapd_drv_none(hapd))
|
||||
if (hostapd_drv_none(hapd) || hapd->drv_priv == NULL)
|
||||
return 0;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "Flushing old station entries");
|
||||
|
|
Loading…
Reference in a new issue