diff --git a/lib/context.c b/lib/context.c index 30883b74..bea95efd 100644 --- a/lib/context.c +++ b/lib/context.c @@ -891,7 +891,6 @@ lws_context_destroy(struct lws_context *context) lws_free(pt->http_header_data); } lws_plat_context_early_destroy(context); - lws_ssl_context_destroy(context); if (context->pt[0].fds) lws_free_set_NULL(context->pt[0].fds); @@ -935,6 +934,7 @@ lws_context_destroy(struct lws_context *context) vh = vh1; } + lws_ssl_context_destroy(context); lws_plat_context_late_destroy(context); lws_free(context);