vici: Fix refcount for CA certificates when reloading authority sections
authorTobias Brunner <tobias@strongswan.org>
Wed, 20 Jan 2021 14:52:33 +0000 (15:52 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 27 Jan 2021 15:50:17 +0000 (16:50 +0100)
Fixes: 3c5e7eaa88b0 ("vici: Keep track of all CA certificates in vici_authority_t")

src/libcharon/plugins/vici/vici_authority.c

index 08f6ce5..fac9f61 100644 (file)
@@ -547,6 +547,8 @@ CALLBACK(authority_sn, bool,
                {
                        /* remove the old authority definition */
                        authorities->remove_at(authorities, enumerator);
                {
                        /* remove the old authority definition */
                        authorities->remove_at(authorities, enumerator);
+                       request->this->certs->remove(request->this->certs, authority->cert,
+                                                                                remove_cert);
                        authority_destroy(authority);
                        break;
                }
                        authority_destroy(authority);
                        break;
                }