From 26992eb911e076874701129d8fe5db43b434e3a6 Mon Sep 17 00:00:00 2001 From: tobhe Date: Mon, 31 Aug 2020 21:02:23 +0000 Subject: 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. --- sbin/iked/ocsp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sbin/iked') 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); -- cgit v1.2.3