diff options
| author | miod <> | 2014-07-12 14:58:32 +0000 |
|---|---|---|
| committer | miod <> | 2014-07-12 14:58:32 +0000 |
| commit | 19a19b8eff7c4c610f87ca07a02612af9017c9d9 (patch) | |
| tree | b1d347ffdd3c76df9af253450a9dbb01eb287231 /src/lib/libcrypto/ocsp/ocsp_ht.c | |
| parent | 0b2f8fc14c724e7d92c6dc1b5f0d1e0e6c411f34 (diff) | |
| download | openbsd-19a19b8eff7c4c610f87ca07a02612af9017c9d9.tar.gz openbsd-19a19b8eff7c4c610f87ca07a02612af9017c9d9.tar.bz2 openbsd-19a19b8eff7c4c610f87ca07a02612af9017c9d9.zip | |
Principle of least surprise: make CMAC_CTX_free(), OCSP_REQ_CTX_free() and
X509_STORE_CTX_free() accept NULL pointers as input without dereferencing them,
like all the other well-behaved *_CTX_free() functions do.
Diffstat (limited to 'src/lib/libcrypto/ocsp/ocsp_ht.c')
| -rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_ht.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ocsp/ocsp_ht.c b/src/lib/libcrypto/ocsp/ocsp_ht.c index bc3c957b0c..c895e9df4d 100644 --- a/src/lib/libcrypto/ocsp/ocsp_ht.c +++ b/src/lib/libcrypto/ocsp/ocsp_ht.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ocsp_ht.c,v 1.19 2014/06/12 15:49:30 deraadt Exp $ */ | 1 | /* $OpenBSD: ocsp_ht.c,v 1.20 2014/07/12 14:58:32 miod Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -108,6 +108,9 @@ static int parse_http_line1(char *line); | |||
| 108 | void | 108 | void |
| 109 | OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx) | 109 | OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx) |
| 110 | { | 110 | { |
| 111 | if (rctx == NULL) | ||
| 112 | return; | ||
| 113 | |||
| 111 | if (rctx->mem) | 114 | if (rctx->mem) |
| 112 | BIO_free(rctx->mem); | 115 | BIO_free(rctx->mem); |
| 113 | free(rctx->iobuf); | 116 | free(rctx->iobuf); |
