diff options
Diffstat (limited to 'crypto/ts/ts_verify_ctx.c')
-rw-r--r-- | crypto/ts/ts_verify_ctx.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/ts/ts_verify_ctx.c b/crypto/ts/ts_verify_ctx.c index 7465e048c5..e23ae268f4 100644 --- a/crypto/ts/ts_verify_ctx.c +++ b/crypto/ts/ts_verify_ctx.c @@ -63,11 +63,9 @@ TS_VERIFY_CTX *TS_VERIFY_CTX_new(void) { - TS_VERIFY_CTX *ctx = OPENSSL_malloc(sizeof(*ctx)); + TS_VERIFY_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); - if (ctx) - memset(ctx, 0, sizeof(*ctx)); - else + if (!ctx) TSerr(TS_F_TS_VERIFY_CTX_NEW, ERR_R_MALLOC_FAILURE); return ctx; } |