From ca3a82c3b364e1e584546f0f3bbb938b0b472580 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Wed, 25 Mar 2015 11:31:18 -0400 Subject: free NULL cleanup This commit handles BIO_ACCEPT_free BIO_CB_FREE BIO_CONNECT_free BIO_free BIO_free_all BIO_vfree Reviewed-by: Matt Caswell --- apps/crl2p7.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'apps/crl2p7.c') diff --git a/apps/crl2p7.c b/apps/crl2p7.c index 0763817e61..ab0c3d6d28 100644 --- a/apps/crl2p7.c +++ b/apps/crl2p7.c @@ -268,10 +268,8 @@ int MAIN(int argc, char **argv) } ret = 0; end: - if (in != NULL) - BIO_free(in); - if (out != NULL) - BIO_free_all(out); + BIO_free(in); + BIO_free_all(out); if (p7 != NULL) PKCS7_free(p7); if (crl != NULL) @@ -326,8 +324,7 @@ static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile) ret = count; end: /* never need to OPENSSL_free x */ - if (in != NULL) - BIO_free(in); + BIO_free(in); if (sk != NULL) sk_X509_INFO_free(sk); return (ret); -- cgit v1.2.3