summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/ocsp/ocsp_ht.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/libcrypto/ocsp/ocsp_ht.c b/lib/libcrypto/ocsp/ocsp_ht.c
index f3ee29ccbb0..3e7c2e46d00 100644
--- a/lib/libcrypto/ocsp/ocsp_ht.c
+++ b/lib/libcrypto/ocsp/ocsp_ht.c
@@ -161,7 +161,7 @@ OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, int maxline)
rctx = malloc(sizeof(OCSP_REQ_CTX));
if (rctx == NULL)
- return 0;
+ return NULL;
rctx->state = OHS_ERROR;
rctx->mem = BIO_new(BIO_s_mem());
rctx->io = io;
@@ -174,7 +174,7 @@ OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, int maxline)
if (!rctx->iobuf) {
BIO_free(rctx->mem);
free(rctx);
- return 0;
+ return NULL;
}
if (!path)
path = "/";
@@ -183,14 +183,14 @@ OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, int maxline)
free(rctx->iobuf);
BIO_free(rctx->mem);
free(rctx);
- return 0;
+ return NULL;
}
if (req && !OCSP_REQ_CTX_set1_req(rctx, req)) {
free(rctx->iobuf);
BIO_free(rctx->mem);
free(rctx);
- return 0;
+ return NULL;
}
return rctx;
@@ -453,6 +453,8 @@ OCSP_sendreq_bio(BIO *b, char *path, OCSP_REQUEST *req)
int rv;
ctx = OCSP_sendreq_new(b, path, req, -1);
+ if (ctx == NULL)
+ return NULL;
do {
rv = OCSP_sendreq_nbio(&resp, ctx);