diff options
author | Rich Salz <rsalz@openssl.org> | 2015-04-30 23:33:59 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-04-30 23:33:59 +0200 |
commit | 222561fe8ef510f336417a666f69f81ddc9b8fe4 (patch) | |
tree | 70bc6af70550022bc7b7af45bd3c6d64d7fc2680 /apps/crl2p7.c | |
parent | free NULL cleanup 8 (diff) | |
download | openssl-222561fe8ef510f336417a666f69f81ddc9b8fe4.tar.xz openssl-222561fe8ef510f336417a666f69f81ddc9b8fe4.zip |
free NULL cleanup 5a
Don't check for NULL before calling a free routine. This gets X509_.*free:
x509_name_ex_free X509_policy_tree_free X509_VERIFY_PARAM_free
X509_STORE_free X509_STORE_CTX_free X509_PKEY_free
X509_OBJECT_free_contents X509_LOOKUP_free X509_INFO_free
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps/crl2p7.c')
-rw-r--r-- | apps/crl2p7.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/crl2p7.c b/apps/crl2p7.c index d75b6674a5..fb2b085ead 100644 --- a/apps/crl2p7.c +++ b/apps/crl2p7.c @@ -215,8 +215,7 @@ int crl2pkcs7_main(int argc, char **argv) BIO_free(in); BIO_free_all(out); PKCS7_free(p7); - if (crl != NULL) - X509_CRL_free(crl); + X509_CRL_free(crl); return (ret); } @@ -267,7 +266,6 @@ static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile) end: /* never need to OPENSSL_free x */ BIO_free(in); - if (sk != NULL) - sk_X509_INFO_free(sk); + sk_X509_INFO_free(sk); return (ret); } |