diff options
Diffstat (limited to 'src/lib/libcrypto/evp/pmeth_lib.c')
-rw-r--r-- | src/lib/libcrypto/evp/pmeth_lib.c | 4 |
1 files changed, 1 insertions, 3 deletions
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) | |||
196 | { | 196 | { |
197 | EVP_PKEY_METHOD *pmeth; | 197 | EVP_PKEY_METHOD *pmeth; |
198 | 198 | ||
199 | pmeth = malloc(sizeof(EVP_PKEY_METHOD)); | 199 | pmeth = calloc(1, sizeof(EVP_PKEY_METHOD)); |
200 | if (!pmeth) | 200 | if (!pmeth) |
201 | return NULL; | 201 | return NULL; |
202 | 202 | ||
203 | memset(pmeth, 0, sizeof(EVP_PKEY_METHOD)); | ||
204 | |||
205 | pmeth->pkey_id = id; | 203 | pmeth->pkey_id = id; |
206 | pmeth->flags = flags | EVP_PKEY_FLAG_DYNAMIC; | 204 | pmeth->flags = flags | EVP_PKEY_FLAG_DYNAMIC; |
207 | 205 | ||