From: Matt Caswell Date: Wed, 30 Mar 2016 17:12:59 +0000 (+0100) Subject: Remove the CRYPTO_mem_leaks adjustment for the BIO X-Git-Tag: OpenSSL_1_1_0-pre5~184 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=b3895f42a9a90a74097c75e39d87ed3212be18dd;hp=b3895f42a9a90a74097c75e39d87ed3212be18dd Remove the CRYPTO_mem_leaks adjustment for the BIO CRYPTO_mem_leaks attempts to adjust the count of bytes leaks to not include the BIO that is being used to print the results out. However this does not work properly. In all internal cases we switch off recording the memory allocation during creation of the BIO so it makes no difference. In other cases if the BIO allocates any additional memory during construction then the adjustment will be wrong anyway. It also skips over the BIO memory during print_leak anyway, so the BIO memory is never added into the total. In other words this was broken in lots of ways and has been since it was first added. The simplest solution is just to make it the documented behaviour that you must turn off memory logging when creating the BIO, and remove all the adjustment stuff completely. The adjustment code was only ever in master and never made it to a release branch so there is no loss of functionality. This commit also fixes a compilation failure when using enable-crypto-mdebug. Reviewed-by: Rich Salz ---