Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-04-22 23:09:09 +0300
committerAdam Langley <agl@google.com>2015-05-05 02:13:12 +0300
commitd8b65c884423f271487f5ab080cbf12dba41f817 (patch)
treed2afd8290618411b31cb697b67dc0320a91c6cab /crypto/pkcs8
parentcca4ba7611ecc6761e2178f39cc9a68e7f5a4911 (diff)
Remove unnecessary NULL checks, part 4.
Finish up crypto, minus the legacy modules we haven't been touching much. Change-Id: I0e9e1999a627aed5fb14841f8a2a7d0b68398e85 Reviewed-on: https://boringssl-review.googlesource.com/4517 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/pkcs8')
-rw-r--r--crypto/pkcs8/pkcs8.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/crypto/pkcs8/pkcs8.c b/crypto/pkcs8/pkcs8.c
index e6b33f6d..843c74d7 100644
--- a/crypto/pkcs8/pkcs8.c
+++ b/crypto/pkcs8/pkcs8.c
@@ -691,9 +691,7 @@ static int PKCS12_handle_content_infos(CBS *content_infos,
ret = 1;
err:
- if (der_bytes != NULL) {
- OPENSSL_free(der_bytes);
- }
+ OPENSSL_free(der_bytes);
return ret;
}
@@ -1012,17 +1010,11 @@ int PKCS12_get_key_and_certs(EVP_PKEY **out_key, STACK_OF(X509) *out_certs,
ret = 1;
err:
- if (ctx.password) {
- OPENSSL_free(ctx.password);
- }
- if (der_bytes) {
- OPENSSL_free(der_bytes);
- }
+ OPENSSL_free(ctx.password);
+ OPENSSL_free(der_bytes);
if (!ret) {
- if (*out_key) {
- EVP_PKEY_free(*out_key);
- *out_key = NULL;
- }
+ EVP_PKEY_free(*out_key);
+ *out_key = NULL;
while (sk_X509_num(out_certs) > original_out_certs_len) {
X509 *x509 = sk_X509_pop(out_certs);
X509_free(x509);