When compiling with SSL, the function irc_destroy_session was not making the call to SSL_free to reclaim memory that was allocated in SSL_new and CRYPTO_malloc.
The attached diff conditionally adds the function call based upon the ENABLE_SSL condition.