From a4ef4dd34fcda2f0edd075938a52db5b2bebc1b6 Mon Sep 17 00:00:00 2001 From: Tobias Girstmair Date: Mon, 20 May 2024 18:36:50 +0200 Subject: [PATCH] free TLS context after closing as per libretls docs. --- ircpipe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ircpipe.c b/ircpipe.c index 45b5821..f9069a9 100644 --- a/ircpipe.c +++ b/ircpipe.c @@ -316,7 +316,10 @@ int irc_poll(const sock_t sock, const int infd, const int outfd) { void irc_cleanup(const sock_t sock) { WRITE(sock, "QUIT :ircpipe\r\n", 15); - if (sock.tls) tls_close(sock.tls); + if (sock.tls) { + tls_close(sock.tls); + tls_free(sock.tls); + } shutdown(sock.fd, SHUT_RDWR); close(sock.fd); } -- 2.39.3