summaryrefslogtreecommitdiffstats
path: root/crypto/mem_sec.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-01-27 23:16:47 -0500
committerRich Salz <rsalz@openssl.org>2016-01-27 23:34:13 -0500
commit3538c7da3d53dca70be5f507376299843046d2b7 (patch)
treee2bc925373cc5891b349041b101a021a8a32b084 /crypto/mem_sec.c
parent109f8b5dec6aa3f46c1df79c8d5f8e8aba10474b (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/mem_sec.c')
-rw-r--r--crypto/mem_sec.c9
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