From 64b25758edca688a30f02c260262150f7ad0bc7d Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Thu, 3 Sep 2015 09:15:26 -0400 Subject: remove 0 assignments. After openssl_zalloc, cleanup more "set to 0/NULL" assignments. Many are from github feedback. Reviewed-by: Tim Hudson --- engines/e_capi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'engines') diff --git a/engines/e_capi.c b/engines/e_capi.c index 450f89e8b1..8b3cfeef95 100644 --- a/engines/e_capi.c +++ b/engines/e_capi.c @@ -1573,23 +1573,18 @@ void capi_free_key(CAPI_KEY * key) static CAPI_CTX *capi_ctx_new() { - CAPI_CTX *ctx = OPENSSL_malloc(sizeof(*ctx)); + CAPI_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); if (!ctx) { CAPIerr(CAPI_F_CAPI_CTX_NEW, ERR_R_MALLOC_FAILURE); return NULL; } - ctx->cspname = NULL; ctx->csptype = PROV_RSA_FULL; ctx->dump_flags = CAPI_DMP_SUMMARY | CAPI_DMP_FNAME; ctx->keytype = AT_KEYEXCHANGE; - ctx->storename = NULL; - ctx->ssl_client_store = NULL; ctx->store_flags = CERT_STORE_OPEN_EXISTING_FLAG | CERT_STORE_READONLY_FLAG | CERT_SYSTEM_STORE_CURRENT_USER; ctx->lookup_method = CAPI_LU_SUBSTR; - ctx->debug_level = 0; - ctx->debug_file = NULL; ctx->client_cert_select = cert_select_simple; return ctx; } -- cgit v1.2.3