From 896ee758458e7d17dd2014f065480b5085e6be10 Mon Sep 17 00:00:00 2001 From: tedu <> Date: Sun, 25 May 2014 20:28:50 +0000 Subject: calloc instead of malloc/memset. from Benjamin Baier --- src/lib/libcrypto/evp/pmeth_lib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/lib/libcrypto/evp/pmeth_lib.c') diff --git a/src/lib/libcrypto/evp/pmeth_lib.c b/src/lib/libcrypto/evp/pmeth_lib.c index e51ae51098..82c3f875f3 100644 --- a/src/lib/libcrypto/evp/pmeth_lib.c +++ b/src/lib/libcrypto/evp/pmeth_lib.c @@ -196,12 +196,10 @@ EVP_PKEY_meth_new(int id, int flags) { EVP_PKEY_METHOD *pmeth; - pmeth = malloc(sizeof(EVP_PKEY_METHOD)); + pmeth = calloc(1, sizeof(EVP_PKEY_METHOD)); if (!pmeth) return NULL; - memset(pmeth, 0, sizeof(EVP_PKEY_METHOD)); - pmeth->pkey_id = id; pmeth->flags = flags | EVP_PKEY_FLAG_DYNAMIC; -- cgit v1.2.3-55-g6feb