Free X509_STOREs in ca_shutdown().
authortobhe <tobhe@openbsd.org>
Sun, 7 Feb 2021 00:56:06 +0000 (00:56 +0000)
committertobhe <tobhe@openbsd.org>
Sun, 7 Feb 2021 00:56:06 +0000 (00:56 +0000)
sbin/iked/ca.c

index 38c0e70..be710c7 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ca.c,v 1.76 2021/02/04 19:59:15 tobhe Exp $   */
+/*     $OpenBSD: ca.c,v 1.77 2021/02/07 00:56:06 tobhe Exp $   */
 
 /*
  * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -131,6 +131,8 @@ ca_shutdown(struct privsep_proc *p)
        ibuf_release(env->sc_certreq);
        if ((store = env->sc_priv) == NULL)
                return;
+       X509_STORE_free(store->ca_cas);
+       X509_STORE_free(store->ca_certs);
        ibuf_release(store->ca_pubkey.id_buf);
        ibuf_release(store->ca_privkey.id_buf);
        free(store);