http://www.openssl.org/support/faq.html#PROG13
http://bbs.chinaunix.net/thread-988772-1-1.html
13. I think I've detected a memory leak, is this a bug?
In most cases the cause of an apparent memory leak is an OpenSSL internal table that is allocated when an application starts up. Since such tables do not grow in size over time they are harmless.
These internal tables can be freed up when an application closes using various functions. Currently these include following:
Thread-local cleanup functions:
ERR_remove_state()
Application-global cleanup functions that are aware of usage (and therefore thread-safe):
ENGINE_cleanup() and CONF_modules_unload()"Brutal" (thread-unsafe) Application-global cleanup functions:
ERR_free_strings(), EVP_cleanup() and CRYPTO_cleanup_all_ex_data().