diff options
author | Rich Salz <rsalz@openssl.org> | 2015-03-24 12:52:24 +0100 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-03-24 12:52:24 +0100 |
commit | 0dfb9398bb6493d5a56216e0c7039cb3f9fc88c6 (patch) | |
tree | 9ffaa0bec3d0f14092948174eeea90dc8e2ee7c4 /crypto/asn1/a_bitstr.c | |
parent | Fix malloc define typo (diff) | |
download | openssl-0dfb9398bb6493d5a56216e0c7039cb3f9fc88c6.tar.xz openssl-0dfb9398bb6493d5a56216e0c7039cb3f9fc88c6.zip |
free NULL cleanup
Start ensuring all OpenSSL "free" routines allow NULL, and remove
any if check before calling them.
This gets ASN1_OBJECT_free and ASN1_STRING_free.
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/asn1/a_bitstr.c')
-rw-r--r-- | crypto/asn1/a_bitstr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/a_bitstr.c b/crypto/asn1/a_bitstr.c index 5a5cc23cb1..4078be4c4b 100644 --- a/crypto/asn1/a_bitstr.c +++ b/crypto/asn1/a_bitstr.c @@ -177,7 +177,7 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, return (ret); err: ASN1err(ASN1_F_C2I_ASN1_BIT_STRING, i); - if ((ret != NULL) && ((a == NULL) || (*a != ret))) + if ((a == NULL) || (*a != ret)) ASN1_BIT_STRING_free(ret); return (NULL); } |