From d9473bfc95b9bc3edd71f25c11f0b47b27500df9 Mon Sep 17 00:00:00 2001 From: doug <> Date: Fri, 25 Jul 2014 06:05:32 +0000 Subject: BIO_free() returns immediately when the sole input is NULL. Remove unnecessary NULL check. ok miod@ --- src/lib/libcrypto/x509/by_file.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/lib/libcrypto/x509') diff --git a/src/lib/libcrypto/x509/by_file.c b/src/lib/libcrypto/x509/by_file.c index 10adcfbd77..04366460bb 100644 --- a/src/lib/libcrypto/x509/by_file.c +++ b/src/lib/libcrypto/x509/by_file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: by_file.c,v 1.15 2014/07/11 08:44:49 jsing Exp $ */ +/* $OpenBSD: by_file.c,v 1.16 2014/07/25 06:05:32 doug Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -182,8 +182,7 @@ X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type) err: if (x != NULL) X509_free(x); - if (in != NULL) - BIO_free(in); + BIO_free(in); return (ret); } @@ -243,8 +242,7 @@ X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type) err: if (x != NULL) X509_CRL_free(x); - if (in != NULL) - BIO_free(in); + BIO_free(in); return (ret); } -- cgit v1.2.3-55-g6feb