diff options
author | 2014-05-25 20:28:50 +0000 | |
---|---|---|
committer | 2014-05-25 20:28:50 +0000 | |
commit | 66415b639e41b19badb8ea5e4b48aa9f294bf48b (patch) | |
tree | cf5efc4440a47d1b6f1105d83cc9b245c40061df /lib/libcrypto/evp/pmeth_lib.c | |
parent | Get the vmspace pointer from the process, not the thread (diff) | |
download | wireguard-openbsd-66415b639e41b19badb8ea5e4b48aa9f294bf48b.tar.xz wireguard-openbsd-66415b639e41b19badb8ea5e4b48aa9f294bf48b.zip |
calloc instead of malloc/memset. from Benjamin Baier
Diffstat (limited to 'lib/libcrypto/evp/pmeth_lib.c')
-rw-r--r-- | lib/libcrypto/evp/pmeth_lib.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libcrypto/evp/pmeth_lib.c b/lib/libcrypto/evp/pmeth_lib.c index e51ae510981..82c3f875f31 100644 --- a/lib/libcrypto/evp/pmeth_lib.c +++ b/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; |