openssl/crypto/bio
Corey Minyard c6048af23c Fix a memory leak in the mem bio
If you use a BIO and set up your own buffer that is not freed, the
memory bio will leak the BIO_BUF_MEM object it allocates.

The trouble is that the BIO_BUF_MEM is allocated and kept around,
but it is not freed if BIO_NOCLOSE is set.

The freeing of BIO_BUF_MEM was fairly confusing, simplify things
so mem_buf_free only frees the memory buffer and free the BIO_BUF_MEM
in mem_free(), where it should be done.

Alse add a test for a leak in the memory bio
Setting a memory buffer caused a leak.

Signed-off-by: Corey Minyard <minyard@acm.org>

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8051)
2019-01-21 17:47:02 +10:00
..
b_addr.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
b_dump.c crypto/bio/b_dump.c: change all char* to void*, and constify 2019-01-16 18:10:41 +01:00
b_print.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
b_sock.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
b_sock2.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bf_buff.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bf_lbuf.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bf_nbio.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bf_null.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bio_cb.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bio_err.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bio_lcl.h Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bio_lib.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bio_meth.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bss_acpt.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bss_bio.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bss_conn.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bss_dgram.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bss_fd.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bss_file.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bss_log.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bss_mem.c Fix a memory leak in the mem bio 2019-01-21 17:47:02 +10:00
bss_null.c Following the license change, modify the boilerplates in crypto/bio/ 2018-12-06 14:28:52 +01:00
bss_sock.c bio: Linux TLS Offload 2018-12-07 11:25:45 +00:00
build.info Adapt bf_lbuf for opaque BIO 2016-03-30 04:35:14 +02:00