diff options
author | Matt Caswell <matt@openssl.org> | 2015-10-30 11:12:26 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-11-09 22:48:41 +0000 |
commit | 90945fa31a42dcf3beb90540c618e4d627c595ea (patch) | |
tree | e73870c253abf0c37ca618384e30a7937a996b55 /crypto/ec/ec_pmeth.c | |
parent | a71edf3ba275b946224b5bcded0a8ecfce1855c0 (diff) | |
download | openssl-90945fa31a42dcf3beb90540c618e4d627c595ea.tar.gz |
Continue standardising malloc style for libcrypto
Continuing from previous commit ensure our style is consistent for malloc
return checks.
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'crypto/ec/ec_pmeth.c')
-rw-r--r-- | crypto/ec/ec_pmeth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/ec/ec_pmeth.c b/crypto/ec/ec_pmeth.c index aa1fa9f53f..ecae0bfe26 100644 --- a/crypto/ec/ec_pmeth.c +++ b/crypto/ec/ec_pmeth.c @@ -93,7 +93,7 @@ static int pkey_ec_init(EVP_PKEY_CTX *ctx) EC_PKEY_CTX *dctx; dctx = OPENSSL_zalloc(sizeof(*dctx)); - if (!dctx) + if (dctx == NULL) return 0; dctx->cofactor_mode = -1; @@ -248,7 +248,7 @@ static int pkey_ec_kdf_derive(EVP_PKEY_CTX *ctx, if (!pkey_ec_derive(ctx, NULL, &ktmplen)) return 0; ktmp = OPENSSL_malloc(ktmplen); - if (!ktmp) + if (ktmp == NULL) return 0; if (!pkey_ec_derive(ctx, ktmp, &ktmplen)) goto err; @@ -442,7 +442,7 @@ static int pkey_ec_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) return 0; } ec = EC_KEY_new(); - if (!ec) + if (ec == NULL) return 0; ret = EC_KEY_set_group(ec, dctx->gen_group); if (ret) |