diff options
author | Matt Caswell <matt@openssl.org> | 2015-11-04 15:51:02 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-11-09 22:54:19 +0000 |
commit | 903738ac63e60c10552741e2d6de9753c67e0ff3 (patch) | |
tree | e2e8b182c351cb41aa65e0cda6d15384223a1f94 /engines | |
parent | a89dda8cd024f53cbae75655e9ec000d9b4a320b (diff) |
Fix missing malloc return value checks
During work on a larger change in master a number of locations were
identified where return value checks were missing. This backports the
relevant fixes.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'engines')
-rw-r--r-- | engines/e_chil.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/e_chil.c b/engines/e_chil.c index 69d49d7d3a..72d14fe383 100644 --- a/engines/e_chil.c +++ b/engines/e_chil.c @@ -839,6 +839,10 @@ static EVP_PKEY *hwcrhk_load_privkey(ENGINE *eng, const char *key_id, bn_fix_top(rtmp->n); res = EVP_PKEY_new(); + if (res == NULL) { + HWCRHKerr(HWCRHK_F_HWCRHK_LOAD_PRIVKEY, HWCRHK_R_CHIL_ERROR); + goto err; + } EVP_PKEY_assign_RSA(res, rtmp); # endif |