X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fcrypto.c;h=cb6e22a20d9336599090c766a07a013095518a44;hb=644638af3fe46f8885ca81c5f872e451494d8c91;hp=77ba8947c210847b98fe290cfa51835a99cfb323;hpb=edcc434338f6f6d69fbe12f846400d2f6c91e982;p=citadel.git diff --git a/webcit/crypto.c b/webcit/crypto.c index 77ba8947c..cb6e22a20 100644 --- a/webcit/crypto.c +++ b/webcit/crypto.c @@ -385,9 +385,15 @@ void endtls(void) lprintf(5, "Ending SSL/TLS\n"); SSL_shutdown(THREADSSL); ctx = SSL_get_SSL_CTX(THREADSSL); - if (ctx != NULL) { - SSL_CTX_free(ctx); - } + + /** I don't think this is needed, and it crashes the server anyway + * + * if (ctx != NULL) { + * lprintf(9, "Freeing CTX at %x\n", (int)ctx ); + * SSL_CTX_free(ctx); + * } + */ + SSL_free(THREADSSL); pthread_setspecific(ThreadSSL, NULL); }