From f31c3a3aa283bd6a34386e3c2fcdcad9ab36e5c4 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Sun, 17 May 2009 21:18:04 +0200 Subject: [PATCH] SSL/TLS: fix error path in gnutls ssl ctx allocation --- src/ngircd/conn-ssl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ngircd/conn-ssl.c b/src/ngircd/conn-ssl.c index fbf796c7..ae1646c5 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