Close ssl also when enc is not set in socket

This commit is contained in:
2023-07-04 21:16:27 +02:00
parent 914aa2d341
commit 56427e3003

View File

@ -374,7 +374,7 @@ long sock_splice_chunked(sock *dst, sock *src, void *buf, unsigned long buf_len,
int sock_close(sock *s) { int sock_close(sock *s) {
int e = errno; int e = errno;
if (s->enc && s->ssl != NULL) { if (s->ssl != NULL) {
SSL_shutdown(s->ssl); SSL_shutdown(s->ssl);
SSL_free(s->ssl); SSL_free(s->ssl);
s->ssl = NULL; s->ssl = NULL;