SSL/TLS: fix error path in gnutls ssl ctx allocation

This commit is contained in:
Florian Westphal 2009-05-17 21:18:04 +02:00
parent b0931f322b
commit f31c3a3aa2
1 changed files with 2 additions and 0 deletions

View File

@ -406,6 +406,7 @@ ConnSSL_Init_SSL(CONNECTION *c)
if (ret < 0) {
Log(LOG_ERR, "gnutls_set_default_priority: %s", gnutls_strerror(ret));
ConnSSL_Free(c);
return false;
}
/*
* The intermediate (long) cast is here to avoid a warning like:
@ -418,6 +419,7 @@ ConnSSL_Init_SSL(CONNECTION *c)
if (ret < 0) {
Log(LOG_ERR, "gnutls_credentials_set: %s", gnutls_strerror(ret));
ConnSSL_Free(c);
return false;
}
gnutls_dh_set_prime_bits(c->ssl_state.gnutls_session, DH_BITS);
#endif