diff options
author | Rich Salz <rsalz@openssl.org> | 2015-05-01 10:02:07 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-01 10:02:07 -0400 |
commit | b548a1f11c06ccdfa4f52a539912d22d77ee309e (patch) | |
tree | 37ff8792ddf09e4805aa3ba76b805923d3c52734 /crypto/ec/ec_ameth.c | |
parent | 33fbca83dcd05b77f807fab205c4523b8cfe85b5 (diff) |
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_ameth.c')
-rw-r--r-- | crypto/ec/ec_ameth.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/ec/ec_ameth.c b/crypto/ec/ec_ameth.c index 0554c209e5..1cc4d4003b 100644 --- a/crypto/ec/ec_ameth.c +++ b/crypto/ec/ec_ameth.c @@ -132,8 +132,7 @@ static int eckey_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) ASN1_OBJECT_free(pval); else ASN1_STRING_free(pval); - if (penc) - OPENSSL_free(penc); + OPENSSL_free(penc); return 0; } @@ -503,8 +502,7 @@ static int do_EC_KEY_print(BIO *bp, const EC_KEY *x, int off, int ktype) BN_free(pub_key); BN_free(order); BN_CTX_free(ctx); - if (buffer != NULL) - OPENSSL_free(buffer); + OPENSSL_free(buffer); return (ret); } |