Browse Source

Merge branch 'master' of https://github.com/civetweb/civetweb

bel2125 4 years ago
parent
commit
cb38d861f8
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/mod_mbedtls.inl

+ 1 - 0
src/mod_mbedtls.inl

@@ -162,6 +162,7 @@ mbed_ssl_accept(mbedtls_ssl_context **ssl,
 	rc = mbed_ssl_handshake(*ssl);
 	if (rc != 0) {
 		DEBUG_TRACE("TLS handshake failed (%i)", rc);
+		mbedtls_ssl_free(*ssl);
 		mg_free(*ssl);
 		*ssl = NULL;
 		return -1;