X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=engines%2Fe_chil.c;h=c660aa97b7ffc2d3cfb654cdefb76e6f510b92c0;hp=0fb7aa49e837d2527032df2a30dcc07c33302a01;hb=b2b361f6afb55c501bedef664c1fdc0d71a91d4b;hpb=57358a83a401ef469353b7ebdae0cf3b870a4d5e diff --git a/engines/e_chil.c b/engines/e_chil.c index 0fb7aa49e8..c660aa97b7 100644 --- a/engines/e_chil.c +++ b/engines/e_chil.c @@ -309,8 +309,10 @@ static int bind_helper(ENGINE *e) # endif chil_lock = CRYPTO_THREAD_lock_new(); - if (chil_lock == NULL) + if (chil_lock == NULL) { + HWCRHKerr(HWCRHK_F_BIND_HELPER, ERR_R_MALLOC_FAILURE); return 0; + } if (!ENGINE_set_id(e, engine_hwcrhk_id) || !ENGINE_set_name(e, engine_hwcrhk_name) || @@ -1092,8 +1094,10 @@ static int hwcrhk_mutex_init(HWCryptoHook_Mutex * mt, HWCryptoHook_CallerContext * cactx) { mt->lock = CRYPTO_THREAD_lock_new(); - if (mt->lock == NULL) + if (mt->lock == NULL) { + HWCRHKerr(HWCRHK_F_HWCRHK_MUTEX_INIT, ERR_R_MALLOC_FAILURE); return 1; /* failure */ + } return 0; /* success */ }