- TLS: fixed memory leak when TLS authentication fails

pull/211/head
Michael Zillgith 6 years ago
parent abcf93416f
commit d20da7c15d

@ -388,6 +388,9 @@ TLSSocket_create(Socket socket, TLSConfiguration configuration, bool storeClient
{ {
DEBUG_PRINT("TLS", "mbedtls_ssl_handshake returned %d\n\n", ret ); DEBUG_PRINT("TLS", "mbedtls_ssl_handshake returned %d\n\n", ret );
mbedtls_ssl_config_free(&(self->conf));
mbedtls_ssl_free(&(self->ssl));
GLOBAL_FREEMEM(self); GLOBAL_FREEMEM(self);
return NULL; return NULL;

@ -521,7 +521,9 @@ handleIsoConnections(IsoServer self, bool isSingleThread)
if (isSingleThread == false) if (isSingleThread == false)
IsoConnection_start(isoConnection); IsoConnection_start(isoConnection);
} }
else {
Socket_destroy(connectionSocket);
}
} }
if (isSingleThread) if (isSingleThread)

Loading…
Cancel
Save