2011/3/25 David Schwartz <dav...@webmaster.com>:
>> //freeing popped client BIO in parent would disconnect client in child,
>> //so I can not free it, which will cause 64B memory leak
>> //parent:   BIO_free ( b=client_bio ) : 1   //???
>
>        I don't know of any elegant solution. But there's a way that works.
> Open a file descriptor or socket you don't care about (for example, open
> /dev/null). Then 'dup2' that file descriptor over the file descriptor for
> this connection. That will implicitly disassociate the descriptor from the
> client's connection, so you can free the client BIO without affecting the
> child.

This might be the way to go, though in fact it lacks elegance I
thought BIO's have. On the other hand, I'll probably have to go for it
anyway, so thank you very much anyway :)

I would be gratefull if anyone can give me a rationale for such a BIO
design, or (even better) tell me I am a stupid bastard, and all I want
can be done using some other, clean and neat solution.

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

Reply via email to