summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ec_kmeth.c
diff options
context:
space:
mode:
authorJ Mohan Rao Arisankala <mohan@barracuda.com>2016-05-05 20:13:32 +0200
committerMatt Caswell <matt@openssl.org>2016-05-09 10:06:06 +0200
commitcb1d435cac2a9a7bd6019f9f23648c8075251109 (patch)
tree37af32e7b67b0871d5542ac223bddfb66058f936 /crypto/ec/ec_kmeth.c
parentmemset() doesn't take NULL. (diff)
downloadopenssl-cb1d435cac2a9a7bd6019f9f23648c8075251109.tar.xz
openssl-cb1d435cac2a9a7bd6019f9f23648c8075251109.zip
few missing allocation failure checks and releases on error paths
- Missing checks for allocation failure. - releasing memory in few missing error paths Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/ec/ec_kmeth.c')
-rw-r--r--crypto/ec/ec_kmeth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/ec/ec_kmeth.c b/crypto/ec/ec_kmeth.c
index 003421eabe..75e58d5316 100644
--- a/crypto/ec/ec_kmeth.c
+++ b/crypto/ec/ec_kmeth.c
@@ -166,6 +166,7 @@ EC_KEY *EC_KEY_new_method(ENGINE *engine)
ret->references = 1;
if (ret->meth->init != NULL && ret->meth->init(ret) == 0) {
+ ECerr(EC_F_EC_KEY_NEW_METHOD, ERR_R_INIT_FAIL);
EC_KEY_free(ret);
return NULL;
}