Yeah, I think I tried that.

But I got multiple free errors. Maybe I did it wrong. I'll try what you 
suggest. What I remember was that it was wrong to delete the SSL session 
(implicitly deleting the equivalent of io_bio in your example), and then 
ap_bio. I didn't try deleting io_bio FIRST, then the session, then the ap_bio.


-----Original Message-----
From: owner-openssl-us...@openssl.org on behalf of David Schwartz
Sent: Sat 4/18/2009 4:20 PM
To: openssl-users@openssl.org
Subject: RE: tracking down memory leaks
 

> I am using a BIO pair under SSL and a BIO above SSL to handle
> asynchronous traffic that is delivered to me on a
> non-standard system.

> It works very well, except when I try to free the SSL sessions
> at the end of a connection. I'm calling BIO_free_all() on the BIO
> that wraps the SSL session, and expect it to free the SSL session
> and underlying BIOs.

I know the following works:

BIO_free(io_bio);
BIO_free(ap_bio);
SSL_free(ssl);

Where 'io_bio' is the BIO you read and write encrypted data to/from,
'ap_bio' is the BIO you read and write application data to/from and 'ssl' is
the SSL object.

I think the problem is that BIO_free_all only frees BIOs, and the SSL
session is not a BIO.

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

<<winmail.dat>>

Reply via email to