summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-01-28 05:16:47 +0100
committerRich Salz <rsalz@openssl.org>2016-01-28 05:34:13 +0100
commit3538c7da3d53dca70be5f507376299843046d2b7 (patch)
treee2bc925373cc5891b349041b101a021a8a32b084 /crypto
parentComment side-effect only calls of X509_check_purpose (diff)
downloadopenssl-3538c7da3d53dca70be5f507376299843046d2b7.tar.xz
openssl-3538c7da3d53dca70be5f507376299843046d2b7.zip
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.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