summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/crypto/comp/comp_lib.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-05-25 20:28:50 +0000
committertedu <tedu@openbsd.org>2014-05-25 20:28:50 +0000
commit66415b639e41b19badb8ea5e4b48aa9f294bf48b (patch)
treecf5efc4440a47d1b6f1105d83cc9b245c40061df /lib/libssl/src/crypto/comp/comp_lib.c
parentGet the vmspace pointer from the process, not the thread (diff)
downloadwireguard-openbsd-66415b639e41b19badb8ea5e4b48aa9f294bf48b.tar.xz
wireguard-openbsd-66415b639e41b19badb8ea5e4b48aa9f294bf48b.zip
calloc instead of malloc/memset. from Benjamin Baier
Diffstat (limited to 'lib/libssl/src/crypto/comp/comp_lib.c')
-rw-r--r--lib/libssl/src/crypto/comp/comp_lib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/comp/comp_lib.c b/lib/libssl/src/crypto/comp/comp_lib.c
index 745c8022281..64d19df6635 100644
--- a/lib/libssl/src/crypto/comp/comp_lib.c
+++ b/lib/libssl/src/crypto/comp/comp_lib.c
@@ -9,11 +9,10 @@ COMP_CTX_new(COMP_METHOD *meth)
{
COMP_CTX *ret;
- if ((ret = (COMP_CTX *)malloc(sizeof(COMP_CTX))) == NULL) {
+ if ((ret = calloc(1, sizeof(COMP_CTX))) == NULL) {
/* ZZZZZZZZZZZZZZZZ */
return (NULL);
}
- memset(ret, 0, sizeof(COMP_CTX));
ret->meth = meth;
if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
free(ret);