diff options
Diffstat (limited to 'src/lib/libcrypto/comp/comp_lib.c')
-rw-r--r-- | src/lib/libcrypto/comp/comp_lib.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libcrypto/comp/comp_lib.c b/src/lib/libcrypto/comp/comp_lib.c index 745c802228..64d19df663 100644 --- a/src/lib/libcrypto/comp/comp_lib.c +++ b/src/lib/libcrypto/comp/comp_lib.c | |||
@@ -9,11 +9,10 @@ COMP_CTX_new(COMP_METHOD *meth) | |||
9 | { | 9 | { |
10 | COMP_CTX *ret; | 10 | COMP_CTX *ret; |
11 | 11 | ||
12 | if ((ret = (COMP_CTX *)malloc(sizeof(COMP_CTX))) == NULL) { | 12 | if ((ret = calloc(1, sizeof(COMP_CTX))) == NULL) { |
13 | /* ZZZZZZZZZZZZZZZZ */ | 13 | /* ZZZZZZZZZZZZZZZZ */ |
14 | return (NULL); | 14 | return (NULL); |
15 | } | 15 | } |
16 | memset(ret, 0, sizeof(COMP_CTX)); | ||
17 | ret->meth = meth; | 16 | ret->meth = meth; |
18 | if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { | 17 | if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { |
19 | free(ret); | 18 | free(ret); |