diff options
author | tedu <> | 2014-05-25 20:28:50 +0000 |
---|---|---|
committer | tedu <> | 2014-05-25 20:28:50 +0000 |
commit | 896ee758458e7d17dd2014f065480b5085e6be10 (patch) | |
tree | 7a0bda660a181d082657a078f67d9146fbd212c2 /src/lib/libcrypto/evp/pmeth_lib.c | |
parent | 339be6db68ff6f687a26e3c86aae9664fb3d0187 (diff) | |
download | openbsd-896ee758458e7d17dd2014f065480b5085e6be10.tar.gz openbsd-896ee758458e7d17dd2014f065480b5085e6be10.tar.bz2 openbsd-896ee758458e7d17dd2014f065480b5085e6be10.zip |
calloc instead of malloc/memset. from Benjamin Baier
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 | ||