diff options
author | Rich Salz <rsalz@openssl.org> | 2015-05-01 16:02:07 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-01 16:02:07 +0200 |
commit | b548a1f11c06ccdfa4f52a539912d22d77ee309e (patch) | |
tree | 37ff8792ddf09e4805aa3ba76b805923d3c52734 /crypto/ec/ec_pmeth.c | |
parent | Fix some typo's, silence warnings. (diff) | |
download | openssl-b548a1f11c06ccdfa4f52a539912d22d77ee309e.tar.xz openssl-b548a1f11c06ccdfa4f52a539912d22d77ee309e.zip |
free null cleanup finale
Don't check for NULL before calling OPENSSL_free
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/ec/ec_pmeth.c')
-rw-r--r-- | crypto/ec/ec_pmeth.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/ec/ec_pmeth.c b/crypto/ec/ec_pmeth.c index 5b3d197b69..ec27e23c68 100644 --- a/crypto/ec/ec_pmeth.c +++ b/crypto/ec/ec_pmeth.c @@ -148,8 +148,7 @@ static void pkey_ec_cleanup(EVP_PKEY_CTX *ctx) if (dctx) { EC_GROUP_free(dctx->gen_group); EC_KEY_free(dctx->co_key); - if (dctx->kdf_ukm) - OPENSSL_free(dctx->kdf_ukm); + OPENSSL_free(dctx->kdf_ukm); OPENSSL_free(dctx); } } @@ -359,8 +358,7 @@ static int pkey_ec_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) return 1; case EVP_PKEY_CTRL_EC_KDF_UKM: - if (dctx->kdf_ukm) - OPENSSL_free(dctx->kdf_ukm); + OPENSSL_free(dctx->kdf_ukm); dctx->kdf_ukm = p2; if (p2) dctx->kdf_ukmlen = p1; |