diff options
author | 2014-05-25 20:28:50 +0000 | |
---|---|---|
committer | 2014-05-25 20:28:50 +0000 | |
commit | 66415b639e41b19badb8ea5e4b48aa9f294bf48b (patch) | |
tree | cf5efc4440a47d1b6f1105d83cc9b245c40061df /lib/libssl/src/crypto/comp/comp_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/libssl/src/crypto/comp/comp_lib.c')
-rw-r--r-- | lib/libssl/src/crypto/comp/comp_lib.c | 3 |
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); |