mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-21 03:23:04 -05:00
Fix memory leak on TLS setup error path
Need tof free TLS context in some cases to avoid a memory leak on error path.
This commit is contained in:
parent
2e06e9dd6f
commit
c7d711609b
@ -169,10 +169,14 @@ static int eap_tls_init_connection(struct eap_sm *sm,
|
|||||||
config->pin = NULL;
|
config->pin = NULL;
|
||||||
eap_sm_request_pin(sm);
|
eap_sm_request_pin(sm);
|
||||||
sm->ignore = TRUE;
|
sm->ignore = TRUE;
|
||||||
|
tls_connection_deinit(sm->ssl_ctx, data->conn);
|
||||||
|
data->conn = NULL;
|
||||||
return -1;
|
return -1;
|
||||||
} else if (res) {
|
} else if (res) {
|
||||||
wpa_printf(MSG_INFO, "TLS: Failed to set TLS connection "
|
wpa_printf(MSG_INFO, "TLS: Failed to set TLS connection "
|
||||||
"parameters");
|
"parameters");
|
||||||
|
tls_connection_deinit(sm->ssl_ctx, data->conn);
|
||||||
|
data->conn = NULL;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user