Fix segmentation fault on EAP-TTLS phase 2 EAP method init failure
This is based on a patch and report by Masashi Honma <honma@ictec.co.jp>. The issue is more generic than just TNC, though, since failure to initialize any phase 2 EAP method can result in NULL dereference.
This commit is contained in:
parent
0d308bc074
commit
99bff8430f
1 changed files with 1 additions and 1 deletions
|
@ -954,7 +954,7 @@ static int eap_ttls_phase2_eap_init(struct eap_sm *sm,
|
|||
sm->init_phase2 = 1;
|
||||
data->phase2_priv = data->phase2_method->init(sm);
|
||||
sm->init_phase2 = 0;
|
||||
return 0;
|
||||
return data->phase2_priv == NULL ? -1 : 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue