aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/main_none.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-03-01 19:50:34 (GMT)
committerJouni Malinen <j@w1.fi>2015-03-01 20:36:53 (GMT)
commit1772d348ea3f6748596c1bd69387457f53d996c4 (patch)
tree78c4631e7f3d7e1eff22680b8e8bbc3ec22b57d7 /wpa_supplicant/main_none.c
parent3f9ebc439c9468bf51219c931a05028aa8a3d3a7 (diff)
downloadhostap-1772d348ea3f6748596c1bd69387457f53d996c4.zip
hostap-1772d348ea3f6748596c1bd69387457f53d996c4.tar.gz
hostap-1772d348ea3f6748596c1bd69387457f53d996c4.tar.bz2
P2P: Fix interface deinit for failed group interface initialization
wpa_supplicant_deinit_iface() ends up removing all P2P groups if the removed interface is the parent interface. This is correct behavior in general, but this resulted in issues in the new group interface initialization error path since wpa_s->parent was not assigned before hitting this check. Fix this by assigning wpa_s->parent as part of wpa_supplicant_add_iface(). Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/main_none.c')
-rw-r--r--wpa_supplicant/main_none.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wpa_supplicant/main_none.c b/wpa_supplicant/main_none.c
index 010c30a..4d3caf2 100644
--- a/wpa_supplicant/main_none.c
+++ b/wpa_supplicant/main_none.c
@@ -28,7 +28,7 @@ int main(int argc, char *argv[])
memset(&iface, 0, sizeof(iface));
/* TODO: set interface parameters */
- if (wpa_supplicant_add_iface(global, &iface) == NULL)
+ if (wpa_supplicant_add_iface(global, &iface, NULL) == NULL)
exitcode = -1;
if (exitcode == 0)