/* This function removes the TLS object pointed to by Tls and frees up the allocated memory. If Tls is NULL, nothing is done. */
VOID EFIAPI TlsFree(IN VOID *Tls)
/* This function removes the TLS object pointed to by Tls and frees up the allocated memory. If Tls is NULL, nothing is done. */
VOID EFIAPI TlsFree(IN VOID *Tls)
{
  TLS_CONNECTION  *TlsConn;
  TlsConn = (TLS_CONNECTION *)Tls;
  if (TlsConn == NULL) {
    return;
  }
  if (TlsConn->Ssl != NULL) {
    SSL_free (TlsConn->Ssl);
  }
  OPENSSL_free (Tls);
}