(no response from openssl-users, trying openssl-dev)


I have created a custom BIO for my openssl application. Everything is working
fine but I appear to have a memory leak with 0.9.8b. My BIO_method only has
non-NULL members type, name, bwrite, bread, and ctrl. create and destroy (and
the others) are NULL.

When I call BIO_new() it does an OPENSSL_malloc(sizeof(BIO)) (bio_lib.c:70).
When I call BIO_free() it checks for a non-NULL destroy method. If it's found
it calls this method and then calls OPENSSL_free()(bio_lib.c:133). However, if
destroy is NULL (which it is in my app) then OPENSSL_free() is never called.

Am I required to implement a destroy method (even if it's a noop)? Any other
methods in BIO_method that I must implement?

__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager majordomo@openssl.org