mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
eap-ttls: Fix memory leak
A very unlikely condition could result in struct phase2_method being leaked.
This commit is contained in:
parent
6917f75c6a
commit
34cd8d5f3e
@ -1089,7 +1089,7 @@ static bool eap_ttls_settings_load(struct eap_state *eap,
|
||||
struct l_settings *settings,
|
||||
const char *prefix)
|
||||
{
|
||||
struct phase2_method *phase2 = l_new(struct phase2_method, 1);
|
||||
struct phase2_method *phase2;
|
||||
const char *phase2_method_name;
|
||||
char setting[72];
|
||||
uint8_t i;
|
||||
@ -1100,6 +1100,8 @@ static bool eap_ttls_settings_load(struct eap_state *eap,
|
||||
if (!phase2_method_name)
|
||||
return false;
|
||||
|
||||
phase2 = l_new(struct phase2_method, 1);
|
||||
|
||||
snprintf(setting, sizeof(setting), "%sTTLS-Phase2-", prefix);
|
||||
|
||||
for (i = 0; tunneled_non_eap_method_ops[i].name; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user