-/* $OpenBSD: cmac.c,v 1.8 2014/07/11 08:44:48 jsing Exp $ */
+/* $OpenBSD: cmac.c,v 1.9 2014/07/12 14:58:32 miod Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
void
CMAC_CTX_free(CMAC_CTX *ctx)
{
+ if (ctx == NULL)
+ return;
+
CMAC_CTX_cleanup(ctx);
free(ctx);
}
-/* $OpenBSD: ocsp_ht.c,v 1.19 2014/06/12 15:49:30 deraadt Exp $ */
+/* $OpenBSD: ocsp_ht.c,v 1.20 2014/07/12 14:58:32 miod Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
void
OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx)
{
+ if (rctx == NULL)
+ return;
+
if (rctx->mem)
BIO_free(rctx->mem);
free(rctx->iobuf);
-/* $OpenBSD: x509_vfy.c,v 1.34 2014/07/11 12:52:41 miod Exp $ */
+/* $OpenBSD: x509_vfy.c,v 1.35 2014/07/12 14:58:32 miod Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
void
X509_STORE_CTX_free(X509_STORE_CTX *ctx)
{
+ if (ctx == NULL)
+ return;
+
X509_STORE_CTX_cleanup(ctx);
free(ctx);
}
-/* $OpenBSD: cmac.c,v 1.8 2014/07/11 08:44:48 jsing Exp $ */
+/* $OpenBSD: cmac.c,v 1.9 2014/07/12 14:58:32 miod Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
void
CMAC_CTX_free(CMAC_CTX *ctx)
{
+ if (ctx == NULL)
+ return;
+
CMAC_CTX_cleanup(ctx);
free(ctx);
}
-/* $OpenBSD: ocsp_ht.c,v 1.19 2014/06/12 15:49:30 deraadt Exp $ */
+/* $OpenBSD: ocsp_ht.c,v 1.20 2014/07/12 14:58:32 miod Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
void
OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx)
{
+ if (rctx == NULL)
+ return;
+
if (rctx->mem)
BIO_free(rctx->mem);
free(rctx->iobuf);
-/* $OpenBSD: x509_vfy.c,v 1.34 2014/07/11 12:52:41 miod Exp $ */
+/* $OpenBSD: x509_vfy.c,v 1.35 2014/07/12 14:58:32 miod Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
void
X509_STORE_CTX_free(X509_STORE_CTX *ctx)
{
+ if (ctx == NULL)
+ return;
+
X509_STORE_CTX_cleanup(ctx);
free(ctx);
}