#299: Second memory leak
---------------------+-------------------
Reporter: double | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 1.4.3
Component: crypto | Version: 1.4.2
Resolution: | Keywords:
Blocked By: | Blocks:
---------------------+-------------------
Comment (by alamaison):
Like #298, these are probably not real leaks. OpenSSL caches various
pieces of global data that it initialises on demand. Once loaded, it
caches them for the lifetime of the program. Some even _have_ to be kept
for security reasons.
If they are causing a problem by creating false positives when you're
checking for memory leaks, try calling some of the globally-destructive
OpenSSL cleanup functions in your application, only when running your leak
checker or test suite.
The following works for me:
{{{
::RAND_cleanup();
::ENGINE_cleanup();
::CONF_modules_unload(1);
::CONF_modules_free();
::EVP_cleanup();
::ERR_free_strings();
::ERR_remove_state(0);
::CRYPTO_cleanup_all_ex_data();
}}}
-- Ticket URL: <https://trac.libssh2.org/ticket/299#comment:1> libssh2 <https://trac.libssh2.org/> C library for writing portable SSH2 clients _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2015-04-02