vici: Fix refcount for CA certificates when reloading authority sections

Fixes: 3c5e7eaa88 ("vici: Keep track of all CA certificates in vici_authority_t")
This commit is contained in:
Tobias Brunner 2021-01-20 15:52:33 +01:00
parent 6c26267b07
commit 4525233b1e
1 changed files with 2 additions and 0 deletions

View File

@ -547,6 +547,8 @@ CALLBACK(authority_sn, bool,
{
/* 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;
}