diff options
author | Richard Levitte <levitte@openssl.org> | 2016-02-17 02:24:25 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-02-17 10:12:49 +0100 |
commit | 05c7b1631b4f6884b9ef5f0943a3d16d36383f52 (patch) | |
tree | 1c835de8d3de04a28174f1178b5b8360ed3e6aa1 /ssl | |
parent | e159fd154362dbaa03c2aaa80e758312bd99fbab (diff) |
Implement the use of heap manipulator implementions
- Make use of the functions given through CRYPTO_set_mem_functions().
- CRYPTO_free(), CRYPTO_clear_free() and CRYPTO_secure_free() now receive
__FILE__ and __LINE__.
- The API for CRYPTO_set_mem_functions() and CRYPTO_get_mem_functions()
is slightly changed, the implementation for free() now takes a couple
of extra arguments, taking __FILE__ and __LINE__.
- The CRYPTO_ memory functions will *always* receive __FILE__ and __LINE__
from the corresponding OPENSSL_ macros, regardless of if crypto-mdebug
has been enabled or not. The reason is that if someone swaps out the
malloc(), realloc() and free() implementations, we can't know if they
will use them or not.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/t1_enc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index f3593f12f6..804803aadc 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -728,8 +728,8 @@ int tls1_export_keying_material(SSL *s, unsigned char *out, size_t olen, SSLerr(SSL_F_TLS1_EXPORT_KEYING_MATERIAL, ERR_R_MALLOC_FAILURE); rv = 0; ret: - CRYPTO_clear_free(val, vallen); - CRYPTO_clear_free(buff, olen); + OPENSSL_clear_free(val, vallen); + OPENSSL_clear_free(buff, olen); return (rv); } |