diff options
author | Doug Hogan <doug@cvs.openbsd.org> | 2014-07-25 06:05:33 +0000 |
---|---|---|
committer | Doug Hogan <doug@cvs.openbsd.org> | 2014-07-25 06:05:33 +0000 |
commit | 3f6f56f88d0b43e70952f28437c1872f732542c3 (patch) | |
tree | ecc44b6abb46886be9db095c6e874c37007c483e /lib/libcrypto/x509 | |
parent | 325e66f18b509fc53d281184b1c8e88f97b84468 (diff) |
BIO_free() returns immediately when the sole input is NULL.
Remove unnecessary NULL check.
ok miod@
Diffstat (limited to 'lib/libcrypto/x509')
-rw-r--r-- | lib/libcrypto/x509/by_file.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libcrypto/x509/by_file.c b/lib/libcrypto/x509/by_file.c index 10adcfbd772..04366460bb0 100644 --- a/lib/libcrypto/x509/by_file.c +++ b/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); } |