When I use OpenSSL, valgrind reports the following:
==25690== 20 bytes in 1 blocks are still reachable in loss record 3 of 3 ==25690== at 0x40053C0: malloc (vg_replace_malloc.c:149) ==25690== by 0x343021D: (within /lib/libcrypto.so.0.9.8e) ==25690== by 0x34308CE: CRYPTO_malloc (in /lib/libcrypto.so.0.9.8e) ==25690== by 0x33BFBC6: sk_new (in /lib/libcrypto.so.0.9.8e) ==25690== by 0x35FE4AC: (within /lib/libssl.so.0.9.8e) ==25690== by 0x35FE706: SSL_COMP_get_compression_methods (in /lib/libssl.so.0.9.8e) ==25690== by 0x3604449: SSL_library_init (in /lib/libssl.so.0.9.8e) I looked at the source code and noticed that OpenSSL allocates memory for the compression methods (see below): static void load_builtin_compressions(void) { <snip> // // Allocates memory here // ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp); However, OpenSSL does not free this memory by calling sk_SSL_COMP_free (see below): // // This function frees up the memory but is not // called anywhere in the OpenSSL source code // #define sk_SSL_COMP_free(st) SKM_sk_free(SSL_COMP, (st)) ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org