Remove unnecessary NULL check.
ok miod@
-/* $OpenBSD: bio_ndef.c,v 1.8 2014/06/12 15:49:27 deraadt Exp $ */
+/* $OpenBSD: bio_ndef.c,v 1.9 2014/07/25 06:05:32 doug Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
return sarg.ndef_bio;
err:
- if (asn_bio)
- BIO_free(asn_bio);
+ BIO_free(asn_bio);
free(ndef_aux);
return NULL;
}
-/* $OpenBSD: bio_lib.c,v 1.20 2014/07/11 15:40:32 miod Exp $ */
+/* $OpenBSD: bio_lib.c,v 1.21 2014/07/25 06:05:32 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
}
return (ret);
err:
- if (ret != NULL)
- BIO_free(ret);
+ BIO_free(ret);
return (NULL);
}
-/* $OpenBSD: bss_acpt.c,v 1.24 2014/07/13 16:03:09 beck Exp $ */
+/* $OpenBSD: bss_acpt.c,v 1.25 2014/07/25 06:05:32 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
free(a->param_addr);
free(a->addr);
- if (a->bio_chain != NULL)
- BIO_free(a->bio_chain);
+ BIO_free(a->bio_chain);
free(a);
}
} else if (num == 1) {
data->accept_nbio = (ptr != NULL);
} else if (num == 2) {
- if (data->bio_chain != NULL)
- BIO_free(data->bio_chain);
+ BIO_free(data->bio_chain);
data->bio_chain = (BIO *)ptr;
}
}
-/* $OpenBSD: cms_lib.c,v 1.3 2014/06/12 15:49:28 deraadt Exp $ */
+/* $OpenBSD: cms_lib.c,v 1.4 2014/07/25 06:05:32 doug Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
return mdbio;
err:
- if (mdbio)
- BIO_free(mdbio);
+ BIO_free(mdbio);
return NULL;
}
-/* $OpenBSD: ocsp_ht.c,v 1.20 2014/07/12 14:58:32 miod Exp $ */
+/* $OpenBSD: ocsp_ht.c,v 1.21 2014/07/25 06:05:32 doug Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
if (rctx == NULL)
return;
- if (rctx->mem)
- BIO_free(rctx->mem);
+ BIO_free(rctx->mem);
free(rctx->iobuf);
free(rctx);
}
-/* $OpenBSD: pk7_doit.c,v 1.28 2014/07/12 16:03:37 miod Exp $ */
+/* $OpenBSD: pk7_doit.c,v 1.29 2014/07/25 06:05:32 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
return 1;
err:
- if (btmp)
- BIO_free(btmp);
+ BIO_free(btmp);
return 0;
}
-/* $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.
*
err:
if (x != NULL)
X509_free(x);
- if (in != NULL)
- BIO_free(in);
+ BIO_free(in);
return (ret);
}
err:
if (x != NULL)
X509_CRL_free(x);
- if (in != NULL)
- BIO_free(in);
+ BIO_free(in);
return (ret);
}
-/* $OpenBSD: apps.c,v 1.68 2014/07/19 03:40:26 lteo Exp $ */
+/* $OpenBSD: apps.c,v 1.69 2014/07/25 06:05:31 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
BIO_printf(err, "unable to load certificate\n");
ERR_print_errors(err);
}
- if (cert != NULL)
- BIO_free(cert);
+ BIO_free(cert);
return (x);
}
goto end;
}
end:
- if (key != NULL)
- BIO_free(key);
+ BIO_free(key);
if (pkey == NULL) {
BIO_printf(err, "unable to load %s\n", key_descrip);
ERR_print_errors(err);
}
end:
- if (key != NULL)
- BIO_free(key);
+ BIO_free(key);
if (pkey == NULL)
BIO_printf(err, "unable to load %s\n", key_descrip);
return (pkey);
-/* $OpenBSD: dh.c,v 1.25 2014/07/14 00:35:10 deraadt Exp $ */
+/* $OpenBSD: dh.c,v 1.26 2014/07/25 06:05:31 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
ret = 0;
end:
- if (in != NULL)
- BIO_free(in);
+ BIO_free(in);
if (out != NULL)
BIO_free_all(out);
if (dh != NULL)
-/* $OpenBSD: dhparam.c,v 1.33 2014/07/14 00:35:10 deraadt Exp $ */
+/* $OpenBSD: dhparam.c,v 1.34 2014/07/25 06:05:31 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
ret = 0;
end:
- if (in != NULL)
- BIO_free(in);
+ BIO_free(in);
if (out != NULL)
BIO_free_all(out);
if (dh != NULL)
-/* $OpenBSD: dsa.c,v 1.28 2014/07/14 00:35:10 deraadt Exp $ */
+/* $OpenBSD: dsa.c,v 1.29 2014/07/25 06:05:31 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
} else
ret = 0;
end:
- if (in != NULL)
- BIO_free(in);
+ BIO_free(in);
if (out != NULL)
BIO_free_all(out);
if (dsa != NULL)
-/* $OpenBSD: dsaparam.c,v 1.34 2014/07/14 00:35:10 deraadt Exp $ */
+/* $OpenBSD: dsaparam.c,v 1.35 2014/07/25 06:05:31 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
ret = 0;
end:
- if (in != NULL)
- BIO_free(in);
+ BIO_free(in);
if (out != NULL)
BIO_free_all(out);
if (dsa != NULL)
-/* $OpenBSD: ec.c,v 1.16 2014/07/14 00:35:10 deraadt Exp $ */
+/* $OpenBSD: ec.c,v 1.17 2014/07/25 06:05:32 doug Exp $ */
/*
* Written by Nils Larsch for the OpenSSL project.
*/
} else
ret = 0;
end:
- if (in)
- BIO_free(in);
+ BIO_free(in);
if (out)
BIO_free_all(out);
if (eckey)
-/* $OpenBSD: ecparam.c,v 1.23 2014/07/14 00:35:10 deraadt Exp $ */
+/* $OpenBSD: ecparam.c,v 1.24 2014/07/25 06:05:32 doug Exp $ */
/*
* Written by Nils Larsch for the OpenSSL project.
*/
if (ec_cofactor)
BN_free(ec_cofactor);
free(buffer);
- if (in != NULL)
- BIO_free(in);
+ BIO_free(in);
if (out != NULL)
BIO_free_all(out);
if (group != NULL)
-/* $OpenBSD: enc.c,v 1.38 2014/07/14 00:35:10 deraadt Exp $ */
+/* $OpenBSD: enc.c,v 1.39 2014/07/25 06:05:32 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
ERR_print_errors(bio_err);
free(strbuf);
free(buff);
- if (in != NULL)
- BIO_free(in);
+ BIO_free(in);
if (out != NULL)
BIO_free_all(out);
- if (benc != NULL)
- BIO_free(benc);
- if (b64 != NULL)
- BIO_free(b64);
+ BIO_free(benc);
+ BIO_free(b64);
#ifdef ZLIB
- if (bzl != NULL)
- BIO_free(bzl);
+ BIO_free(bzl);
#endif
free(pass);
-/* $OpenBSD: gendsa.c,v 1.30 2014/07/14 00:35:10 deraadt Exp $ */
+/* $OpenBSD: gendsa.c,v 1.31 2014/07/25 06:05:32 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
end:
if (ret != 0)
ERR_print_errors(bio_err);
- if (in != NULL)
- BIO_free(in);
+ BIO_free(in);
if (out != NULL)
BIO_free_all(out);
if (dsa != NULL)
-/* $OpenBSD: passwd.c,v 1.23 2014/07/14 00:35:10 deraadt Exp $ */
+/* $OpenBSD: passwd.c,v 1.24 2014/07/25 06:05:32 doug Exp $ */
#if defined OPENSSL_NO_MD5
#define NO_MD5CRYPT_1
ERR_print_errors(bio_err);
free(salt_malloc);
free(passwd_malloc);
- if (in)
- BIO_free(in);
+ BIO_free(in);
if (out)
BIO_free_all(out);
-/* $OpenBSD: s_server.c,v 1.61 2014/07/14 00:35:10 deraadt Exp $ */
+/* $OpenBSD: s_server.c,v 1.62 2014/07/25 06:05:32 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
goto err;
ret = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
err:
- if (bio != NULL)
- BIO_free(bio);
+ BIO_free(bio);
return (ret);
}
#endif
-/* $OpenBSD: sess_id.c,v 1.19 2014/07/14 00:35:10 deraadt Exp $ */
+/* $OpenBSD: sess_id.c,v 1.20 2014/07/25 06:05:32 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
goto end;
}
end:
- if (in != NULL)
- BIO_free(in);
+ BIO_free(in);
return (x);
}
-/* $OpenBSD: bio_ndef.c,v 1.8 2014/06/12 15:49:27 deraadt Exp $ */
+/* $OpenBSD: bio_ndef.c,v 1.9 2014/07/25 06:05:32 doug Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
return sarg.ndef_bio;
err:
- if (asn_bio)
- BIO_free(asn_bio);
+ BIO_free(asn_bio);
free(ndef_aux);
return NULL;
}
-/* $OpenBSD: bio_lib.c,v 1.20 2014/07/11 15:40:32 miod Exp $ */
+/* $OpenBSD: bio_lib.c,v 1.21 2014/07/25 06:05:32 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
}
return (ret);
err:
- if (ret != NULL)
- BIO_free(ret);
+ BIO_free(ret);
return (NULL);
}
-/* $OpenBSD: bss_acpt.c,v 1.24 2014/07/13 16:03:09 beck Exp $ */
+/* $OpenBSD: bss_acpt.c,v 1.25 2014/07/25 06:05:32 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
free(a->param_addr);
free(a->addr);
- if (a->bio_chain != NULL)
- BIO_free(a->bio_chain);
+ BIO_free(a->bio_chain);
free(a);
}
} else if (num == 1) {
data->accept_nbio = (ptr != NULL);
} else if (num == 2) {
- if (data->bio_chain != NULL)
- BIO_free(data->bio_chain);
+ BIO_free(data->bio_chain);
data->bio_chain = (BIO *)ptr;
}
}
-/* $OpenBSD: cms_lib.c,v 1.3 2014/06/12 15:49:28 deraadt Exp $ */
+/* $OpenBSD: cms_lib.c,v 1.4 2014/07/25 06:05:32 doug Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
return mdbio;
err:
- if (mdbio)
- BIO_free(mdbio);
+ BIO_free(mdbio);
return NULL;
}
-/* $OpenBSD: ocsp_ht.c,v 1.20 2014/07/12 14:58:32 miod Exp $ */
+/* $OpenBSD: ocsp_ht.c,v 1.21 2014/07/25 06:05:32 doug Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
if (rctx == NULL)
return;
- if (rctx->mem)
- BIO_free(rctx->mem);
+ BIO_free(rctx->mem);
free(rctx->iobuf);
free(rctx);
}
-/* $OpenBSD: pk7_doit.c,v 1.28 2014/07/12 16:03:37 miod Exp $ */
+/* $OpenBSD: pk7_doit.c,v 1.29 2014/07/25 06:05:32 doug Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
return 1;
err:
- if (btmp)
- BIO_free(btmp);
+ BIO_free(btmp);
return 0;
}
-/* $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.
*
err:
if (x != NULL)
X509_free(x);
- if (in != NULL)
- BIO_free(in);
+ BIO_free(in);
return (ret);
}
err:
if (x != NULL)
X509_CRL_free(x);
- if (in != NULL)
- BIO_free(in);
+ BIO_free(in);
return (ret);
}