summaryrefslogtreecommitdiff
path: root/libarchive/archive_openssl_evp_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive_openssl_evp_private.h')
-rw-r--r--libarchive/archive_openssl_evp_private.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/libarchive/archive_openssl_evp_private.h b/libarchive/archive_openssl_evp_private.h
index 0e97e276..43a3ccc5 100644
--- a/libarchive/archive_openssl_evp_private.h
+++ b/libarchive/archive_openssl_evp_private.h
@@ -33,10 +33,7 @@
#include <string.h> /* memset */
static inline EVP_MD_CTX *EVP_MD_CTX_new(void)
{
- EVP_MD_CTX *ctx = (EVP_MD_CTX *)malloc(sizeof(EVP_MD_CTX));
- if (ctx != NULL) {
- memset(ctx, 0, sizeof(*ctx));
- }
+ EVP_MD_CTX *ctx = (EVP_MD_CTX *)calloc(1, sizeof(EVP_MD_CTX));
return ctx;
}