I've been doing some memory leak checking on an OpenSSL app and discovered
that a memory leak occurs in SSL_CTX_new(). Stack trace is below.
The SSL_get_ex_data_X509_STORE_CTX_idx() function is used to check for an
error but internally allocates resources which SSL_CTX_free() does not
free up.
_heap_alloc_dbg(unsigned int 20, int 1, const char * 0x00000000, int 0) line
338
_nh_malloc_dbg(unsigned int 20, int 0, int 1, const char * 0x00000000, int
0) line 248 + 21 bytes
malloc(unsigned int 20) line 130 + 21 bytes
CRYPTO_malloc(int 20, const char * 0x00534390 `string', int 117) line 204 +
10 bytes
sk_new(int (void)* 0x00000000) line 117 + 23 bytes
sk_CRYPTO_EX_DATA_FUNCS_new_null() line 223 + 16 bytes
CRYPTO_get_ex_new_index(int 0, stack_st_CRYPTO_EX_DATA_FUNCS * * 0x00552cd0
x509_store_ctx_method, long 0, void * 0x005a9764 `string', int (void *, void
*, crypto_ex_data_st *, int, long, void *)* 0x00000000, int
(crypto_ex_data_st *, crypto_ex_data_st *, void *, int, long, void *)*
0x00000000, void (void *, void *, crypto_ex_data_st *, int, long, void *)*
0x00000000) line 74 + 5 b
X509_STORE_CTX_get_ex_new_index(long 0, void * 0x005a9764 `string', int
(void *, void *, crypto_ex_data_st *, int, long, void *)* 0x00000000, int
(crypto_ex_data_st *, crypto_ex_data_st *, void *, int, long, void *)*
0x00000000, void (void *, void *, crypto_ex_data_st *, int, long, void *)*
0x00000000) line 682 + 39 bytes
SSL_get_ex_data_X509_STORE_CTX_idx() line 137 + 18 bytes
SSL_CTX_new(ssl_method_st * 0x005b1100 SSLv23_client_data) line 1094 + 5
bytes
Paul Keogh
ANAM Wireless Internet Solutions
http://www.anam.com
+353 1 284 7555 (wired) +353 86 234 6047 (wireless)
Castle Yard, Saint Patrick's Road, Dalkey, County Dublin, Ireland
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]