summaryrefslogtreecommitdiff
path: root/sbin/iked
diff options
context:
space:
mode:
authortobhe <tobhe@cvs.openbsd.org>2020-08-31 21:02:23 +0000
committertobhe <tobhe@cvs.openbsd.org>2020-08-31 21:02:23 +0000
commit26992eb911e076874701129d8fe5db43b434e3a6 (patch)
treea91d77eadf892dc84ed8eb891f27d824dd66c2b9 /sbin/iked
parentfd4c2bef9cdbb6b490004d7747e8e97c552e4b83 (diff)
Both ocsp_req_ctx and ocsp_req must be freed. Don't free ocsp_id as it
is owned by ocsp_req and is cleaned up automatically.
Diffstat (limited to 'sbin/iked')
-rw-r--r--sbin/iked/ocsp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sbin/iked/ocsp.c b/sbin/iked/ocsp.c
index 808888a7db5..e593fa1aa07 100644
--- a/sbin/iked/ocsp.c
+++ b/sbin/iked/ocsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ocsp.c,v 1.14 2020/08/31 17:45:30 tobhe Exp $ */
+/* $OpenBSD: ocsp.c,v 1.15 2020/08/31 21:02:22 tobhe Exp $ */
/*
* Copyright (c) 2014 Markus Friedl
@@ -325,13 +325,11 @@ ocsp_free(struct iked_ocsp *ocsp)
}
if (ocsp->ocsp_cbio != NULL)
BIO_free_all(ocsp->ocsp_cbio);
- if (ocsp->ocsp_id != NULL)
- OCSP_CERTID_free(ocsp->ocsp_id);
- /* XXX not sure about ownership XXX */
if (ocsp->ocsp_req_ctx != NULL)
OCSP_REQ_CTX_free(ocsp->ocsp_req_ctx);
- else if (ocsp->ocsp_req != NULL)
+
+ if (ocsp->ocsp_req != NULL)
OCSP_REQUEST_free(ocsp->ocsp_req);
free(ocsp);