On Sat, Jul 19, 2014, Iaki Baz Castillo wrote:

> Hi,
> 
> The doc [*] says:
> 
> "If the BIO_CLOSE flag is set when a memory BIO is freed then the
> underlying BUF_MEM structure is also freed."
> 
> The only place to set such a BIO_CLOSE flag is in the c argument in function:
> 
> BIO_set_mem_buf(BIO *b,BUF_MEM *bm,int c)
> 

It can also be set with BIO_set_close().

> So, must I understand that, in case I don't set a custom buffer (this
> is, I do not call to BIO_set_mem_buf(), then the internal buffer of my
> BIO will be freed when I call free(my_bio)?
> 

And if you don't call BIO_set_close() with BIO_NOCLOSE, yes.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to