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/asn1/x_x509.c | |
parent | 33fbca83dcd05b77f807fab205c4523b8cfe85b5 (diff) | |
download | openssl-b548a1f11c06ccdfa4f52a539912d22d77ee309e.tar.gz |
free null cleanup finale
Don't check for NULL before calling OPENSSL_free
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/asn1/x_x509.c')
-rw-r--r-- | crypto/asn1/x_x509.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crypto/asn1/x_x509.c b/crypto/asn1/x_x509.c index 08bb4bd33c..1b353af844 100644 --- a/crypto/asn1/x_x509.c +++ b/crypto/asn1/x_x509.c @@ -103,8 +103,7 @@ static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, break; case ASN1_OP_D2I_POST: - if (ret->name != NULL) - OPENSSL_free(ret->name); + OPENSSL_free(ret->name); ret->name = X509_NAME_oneline(ret->cert_info->subject, NULL, 0); break; @@ -119,9 +118,7 @@ static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, NAME_CONSTRAINTS_free(ret->nc); sk_IPAddressFamily_pop_free(ret->rfc3779_addr, IPAddressFamily_free); ASIdentifiers_free(ret->rfc3779_asid); - - if (ret->name != NULL) - OPENSSL_free(ret->name); + OPENSSL_free(ret->name); break; } |