diff options
author | 2014-04-23 21:49:49 +0000 | |
---|---|---|
committer | 2014-04-23 21:49:49 +0000 | |
commit | 2186d756747943a8be0c0982a66af37c12203338 (patch) | |
tree | 89fb3ad0101fc0034dd95766e7313c23436f699e /lib/libssl/src | |
parent | No longer needed during build. Brings a smile on beck@'s face. (diff) | |
download | wireguard-openbsd-2186d756747943a8be0c0982a66af37c12203338.tar.xz wireguard-openbsd-2186d756747943a8be0c0982a66af37c12203338.zip |
malloc/memset -> calloc. from peter malone
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/crypto/dso/dso_lib.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/dso/dso_lib.c b/lib/libssl/src/crypto/dso/dso_lib.c index 1ee4e45dce4..ae10104560e 100644 --- a/lib/libssl/src/crypto/dso/dso_lib.c +++ b/lib/libssl/src/crypto/dso/dso_lib.c @@ -107,12 +107,11 @@ DSO_new_method(DSO_METHOD *meth) * to stealing the "best available" method. Will fallback * to DSO_METH_null() in the worst case. */ default_DSO_meth = DSO_METHOD_openssl(); - ret = (DSO *)malloc(sizeof(DSO)); + ret = calloc(1, sizeof(DSO)); if (ret == NULL) { DSOerr(DSO_F_DSO_NEW_METHOD, ERR_R_MALLOC_FAILURE); return (NULL); } - memset(ret, 0, sizeof(DSO)); ret->meth_data = sk_void_new_null(); if (ret->meth_data == NULL) { /* sk_new doesn't generate any errors so we do */ |