mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
TLS: Fix memory leaks on tls_connection_set_params() error paths
The internal TLS implementation started rejecting number of unsupported configuration parameters recently, but those new error paths did not free the allocated tlsv1_credentials buffer. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
af851914f8
commit
c4b45c60ad
@ -192,26 +192,31 @@ int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn,
|
||||
|
||||
if (params->subject_match) {
|
||||
wpa_printf(MSG_INFO, "TLS: subject_match not supported");
|
||||
tlsv1_cred_free(cred);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (params->altsubject_match) {
|
||||
wpa_printf(MSG_INFO, "TLS: altsubject_match not supported");
|
||||
tlsv1_cred_free(cred);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (params->suffix_match) {
|
||||
wpa_printf(MSG_INFO, "TLS: suffix_match not supported");
|
||||
tlsv1_cred_free(cred);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (params->domain_match) {
|
||||
wpa_printf(MSG_INFO, "TLS: domain_match not supported");
|
||||
tlsv1_cred_free(cred);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (params->openssl_ciphers) {
|
||||
wpa_printf(MSG_INFO, "GnuTLS: openssl_ciphers not supported");
|
||||
wpa_printf(MSG_INFO, "TLS: openssl_ciphers not supported");
|
||||
tlsv1_cred_free(cred);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user