1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

openssl: client: handle no tcr

This commit is contained in:
kzhdev 2019-04-05 12:14:47 -05:00 committed by Andy Green
parent af817c6532
commit c40394f968

View file

@ -101,7 +101,7 @@ lws_ssl_destroy_client_ctx(struct lws_vhost *vhost)
tcr = SSL_CTX_get_ex_data(vhost->tls.ssl_client_ctx,
openssl_SSL_CTX_private_data_index);
if (--tcr->refcount)
if (!tcr || --tcr->refcount)
return;
SSL_CTX_free(vhost->tls.ssl_client_ctx);