|
Hello,
the Microsoft debug memory detects leaks that are not detected by openssl's
debug tools. These leaks occur in a signature verification function that I'm
implementing on the PKCS#7 module, and might result in insufficient memory in my
server over time.
I'd really appreciate if someone told me wether I made a mistake or not in
this very short code sequence, i.e. if I forgot some cleanup function
call.
OpenSSL 0.9.5 on WIN NT4, VC++, static link w/ Openssl.
The leaks occurs in the following sequence:
cert_store = X509_STORE_new();
if (cert_store == NULL) { /* YELL */ break; } X509_STORE_set_default_paths(cert_store); /* LEAKS HERE */ if (cert_store != NULL) X509_STORE_free(cert_store); The Microsoft debug output is as follows:
Dumping objects ->
{5858} normal block at 0x0091CEE0, 64 bytes long. Data: < > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 {5857} normal block at 0x0091CF50, 96 bytes long. Data: < d@ d@ > E0 CE 91 00 F1 64 40 00 E4 64 40 00 08 00 00 00 I have the openssl debug memory active too, but it doesnt detect
anything.
Attached is a source file demonstrating the problem, compile and execute on
WINNT, define _DEBUG, WIN32, CRYPTO_MDEBUG when compiling.
Thanks in advance...
________________________________
Richard Dykiel, Adero Inc 150 Baker Avenue, Concord, MA 01742 http://www.adero.com 1-978-287-5560 ext289 |
memleaks.c