diff options
author | jsg <> | 2014-04-17 18:38:53 +0000 |
---|---|---|
committer | jsg <> | 2014-04-17 18:38:53 +0000 |
commit | 87dc5ba7fdbe9aad46f68ad25457c433066ca01b (patch) | |
tree | 430c8107ea049150a784c44e30dc0d1f529b8a97 /src/lib/libcrypto/ocsp | |
parent | bdccac7bb03aa13ef9c01cc6ecc1cc7bc42f6f9d (diff) | |
download | openbsd-87dc5ba7fdbe9aad46f68ad25457c433066ca01b.tar.gz openbsd-87dc5ba7fdbe9aad46f68ad25457c433066ca01b.tar.bz2 openbsd-87dc5ba7fdbe9aad46f68ad25457c433066ca01b.zip |
fix some more leaks, mostly suggestions from miod
ok miod@
Diffstat (limited to 'src/lib/libcrypto/ocsp')
-rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_ht.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/libcrypto/ocsp/ocsp_ht.c b/src/lib/libcrypto/ocsp/ocsp_ht.c index 0fa23b027b..db20759d3b 100644 --- a/src/lib/libcrypto/ocsp/ocsp_ht.c +++ b/src/lib/libcrypto/ocsp/ocsp_ht.c | |||
@@ -168,6 +168,7 @@ OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, | |||
168 | rctx->iobuflen = OCSP_MAX_LINE_LEN; | 168 | rctx->iobuflen = OCSP_MAX_LINE_LEN; |
169 | rctx->iobuf = malloc(rctx->iobuflen); | 169 | rctx->iobuf = malloc(rctx->iobuflen); |
170 | if (!rctx->iobuf) { | 170 | if (!rctx->iobuf) { |
171 | BIO_free(rctx->mem); | ||
171 | free(rctx); | 172 | free(rctx); |
172 | return 0; | 173 | return 0; |
173 | } | 174 | } |
@@ -176,12 +177,14 @@ OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req, | |||
176 | 177 | ||
177 | if (BIO_printf(rctx->mem, post_hdr, path) <= 0) { | 178 | if (BIO_printf(rctx->mem, post_hdr, path) <= 0) { |
178 | free(rctx->iobuf); | 179 | free(rctx->iobuf); |
180 | BIO_free(rctx->mem); | ||
179 | free(rctx); | 181 | free(rctx); |
180 | return 0; | 182 | return 0; |
181 | } | 183 | } |
182 | 184 | ||
183 | if (req && !OCSP_REQ_CTX_set1_req(rctx, req)) { | 185 | if (req && !OCSP_REQ_CTX_set1_req(rctx, req)) { |
184 | free(rctx->iobuf); | 186 | free(rctx->iobuf); |
187 | BIO_free(rctx->mem); | ||
185 | free(rctx); | 188 | free(rctx); |
186 | return 0; | 189 | return 0; |
187 | } | 190 | } |