diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-09 22:55:18 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-09 22:55:18 +0000 |
commit | a57699c1800cbef0cf07cffaf9eef7e921835d2b (patch) | |
tree | 288f7cbb8bdca4ad3af95ff887311921608d12b3 /lib/libcrypto/dsa | |
parent | 3fe81a8154c8dbfc402f9e330c634c52df3b5b79 (diff) |
ASN1_STRING_free can handle NULL, so callers don't need to check. ok miod
Diffstat (limited to 'lib/libcrypto/dsa')
-rw-r--r-- | lib/libcrypto/dsa/dsa_ameth.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/libcrypto/dsa/dsa_ameth.c b/lib/libcrypto/dsa/dsa_ameth.c index c6707b94279..06b804b19d9 100644 --- a/lib/libcrypto/dsa/dsa_ameth.c +++ b/lib/libcrypto/dsa/dsa_ameth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_ameth.c,v 1.9 2014/07/09 10:16:24 miod Exp $ */ +/* $OpenBSD: dsa_ameth.c,v 1.10 2014/07/09 22:55:17 tedu Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -164,8 +164,7 @@ dsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) err: free(penc); - if (pval) - ASN1_STRING_free(pval); + ASN1_STRING_free(pval); return 0; } @@ -319,10 +318,8 @@ dsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) err: free(dp); - if (params != NULL) - ASN1_STRING_free(params); - if (prkey != NULL) - ASN1_INTEGER_free(prkey); + ASN1_STRING_free(params); + ASN1_INTEGER_free(prkey); return 0; } |