diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-04-17 18:38:54 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-04-17 18:38:54 +0000 |
commit | 64a5e384cae430b0456f17ec27a84f6233f894d2 (patch) | |
tree | 523353f5de15fc6c0260890e91e55ba9b79d862c /lib/libcrypto/ocsp | |
parent | be7a3c04c089440ad06417a18d51f60fcdfbc6a8 (diff) |
fix some more leaks, mostly suggestions from miod
ok miod@
Diffstat (limited to 'lib/libcrypto/ocsp')
-rw-r--r-- | lib/libcrypto/ocsp/ocsp_ht.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libcrypto/ocsp/ocsp_ht.c b/lib/libcrypto/ocsp/ocsp_ht.c index 0fa23b027b5..db20759d3ba 100644 --- a/lib/libcrypto/ocsp/ocsp_ht.c +++ b/lib/libcrypto/ocsp/ocsp_ht.c @@ -168,6 +168,7 @@ OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, rctx->iobuflen = OCSP_MAX_LINE_LEN; rctx->iobuf = malloc(rctx->iobuflen); if (!rctx->iobuf) { + BIO_free(rctx->mem); free(rctx); return 0; } @@ -176,12 +177,14 @@ OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, if (BIO_printf(rctx->mem, post_hdr, path) <= 0) { free(rctx->iobuf); + BIO_free(rctx->mem); free(rctx); return 0; } if (req && !OCSP_REQ_CTX_set1_req(rctx, req)) { free(rctx->iobuf); + BIO_free(rctx->mem); free(rctx); return 0; } |