Module: ngircd.git Branch: master Commit: f31c3a3aa283bd6a34386e3c2fcdcad9ab36e5c4 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=f31c3...
Author: Florian Westphal fw@strlen.de Date: Sun May 17 21:18:04 2009 +0200
SSL/TLS: fix error path in gnutls ssl ctx allocation
---
src/ngircd/conn-ssl.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/ngircd/conn-ssl.c b/src/ngircd/conn-ssl.c index fbf796c..ae1646c 100644 --- a/src/ngircd/conn-ssl.c +++ b/src/ngircd/conn-ssl.c @@ -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
ngircd-commits@lists.barton.de