fix invalid use of return code in SSL_shutdown
fix memory leak when reading configuration files