diff options
author | Rich Salz <rsalz@openssl.org> | 2016-01-27 23:16:47 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-01-27 23:34:13 -0500 |
commit | 3538c7da3d53dca70be5f507376299843046d2b7 (patch) | |
tree | e2bc925373cc5891b349041b101a021a8a32b084 /crypto | |
parent | 109f8b5dec6aa3f46c1df79c8d5f8e8aba10474b (diff) |
Add CRYPTO_secure_zalloc
Also turn B<foo> into foo() in the pod page.
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/mem_sec.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/mem_sec.c b/crypto/mem_sec.c index 9adc124e36..6760cf40fc 100644 --- a/crypto/mem_sec.c +++ b/crypto/mem_sec.c @@ -110,6 +110,15 @@ void *CRYPTO_secure_malloc(size_t num, const char *file, int line) #endif /* IMPLEMENTED */ } +void *CRYPTO_secure_zalloc(size_t num, const char *file, int line) +{ + void *ret = CRYPTO_secure_malloc(num, file, line); + + if (ret != NULL) + memset(ret, 0, num); + return ret; +} + void CRYPTO_secure_free(void *ptr) { #ifdef IMPLEMENTED |