diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2009-11-10 17:01:26 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2009-11-10 17:01:26 +0200 |
commit | e542b40f9384beb8b19d0a8017bfae2487c6798d (patch) | |
tree | 8ff11ecd0fb3e4a484139c24b4cbce8beeeffcb5 /hostapd | |
parent | 1d68e4c7d975b519dc087ef3212ac79848721fb1 (diff) | |
download | external_wpa_supplicant_8_ti-e542b40f9384beb8b19d0a8017bfae2487c6798d.zip external_wpa_supplicant_8_ti-e542b40f9384beb8b19d0a8017bfae2487c6798d.tar.gz external_wpa_supplicant_8_ti-e542b40f9384beb8b19d0a8017bfae2487c6798d.tar.bz2 |
WPS: Fix credential processing for open network case
There is no point in comparing cred->key == NULL since cred->key is
an array (never NULL). key_len == 0 should be used instead to indicate
that no key was specified.
Diffstat (limited to 'hostapd')
-rw-r--r-- | hostapd/wps_hostapd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hostapd/wps_hostapd.c b/hostapd/wps_hostapd.c index fd2e65a..1e9aeae 100644 --- a/hostapd/wps_hostapd.c +++ b/hostapd/wps_hostapd.c @@ -242,7 +242,7 @@ static int hostapd_wps_cred_cb(void *ctx, const struct wps_credential *cred) hapd->wps->ssid_len = cred->ssid_len; hapd->wps->encr_types = cred->encr_type; hapd->wps->auth_types = cred->auth_type; - if (cred->key == NULL) { + if (cred->key_len == 0) { os_free(hapd->wps->network_key); hapd->wps->network_key = NULL; hapd->wps->network_key_len = 0; |