diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-10-22 17:26:00 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-10-22 17:26:21 +0300 |
commit | a9be6220074d78f4e97dcd999755e0278e261c62 (patch) | |
tree | 9209f279fb130e10502f1042ad53098184bdf17f | |
parent | 13fe456581693421459100d60a7a0f93e05ce533 (diff) | |
download | libmicrohttpd-a9be6220074d78f4e97dcd999755e0278e261c62.tar.gz libmicrohttpd-a9be6220074d78f4e97dcd999755e0278e261c62.zip |
Do not deinit GnuTLS if it wasn't inited.
Fix for 13fe456581693421459100d60a7a0f93e05ce533
-rw-r--r-- | src/microhttpd/daemon.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 98b93ae5..fde43df7 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -2539,7 +2539,8 @@ new_connection_prepare_ (struct MHD_Daemon *daemon, | |||
2539 | (GNUTLS_E_SUCCESS != gnutls_priority_set (connection->tls_session, | 2539 | (GNUTLS_E_SUCCESS != gnutls_priority_set (connection->tls_session, |
2540 | daemon->priority_cache))) | 2540 | daemon->priority_cache))) |
2541 | { | 2541 | { |
2542 | gnutls_deinit (connection->tls_session); | 2542 | if (NULL != connection->tls_session) |
2543 | gnutls_deinit (connection->tls_session); | ||
2543 | MHD_socket_close_chk_ (client_socket); | 2544 | MHD_socket_close_chk_ (client_socket); |
2544 | MHD_ip_limit_del (daemon, | 2545 | MHD_ip_limit_del (daemon, |
2545 | addr, | 2546 | addr, |