diff options
author | Luke Bratch <luke@bratch.co.uk> | 2019-05-21 20:41:54 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2019-05-21 20:41:54 +0100 |
commit | 33f5a2c2f9eb4ff145df00944d8561fcf95866c7 (patch) | |
tree | 8e5731ff54bdd3fa7b3a5f08b32aade10a0f05b4 /blabouncer.c | |
parent | ad733362c0f09aaeb5be4862bcb50a78c4947792 (diff) |
Only do SSL_free() in disconnectclient() if using client TLS.
Diffstat (limited to 'blabouncer.c')
-rw-r--r-- | blabouncer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/blabouncer.c b/blabouncer.c index 78ddd9f..520341d 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -282,8 +282,10 @@ int disconnectclient(int fd, struct client *clients, struct ircdstrings *ircdstr clients[i].pendingwhois = 0; clients[i].pendingwhowas = 0; clients[i].pendingnames = 0; - // Finish up with OpenSSL - SSL_free(clients[i].ssl); + if (settings->clienttls) { + // Finish up with OpenSSL if using client TLS + SSL_free(clients[i].ssl); + } // Close the socket close(fd); // Now clients array is cleared, inform all other clients (source "0" since we trust this message) |