-/* $OpenBSD: ca.c,v 1.84 2021/12/13 17:35:34 tobhe Exp $ */
+/* $OpenBSD: ca.c,v 1.85 2021/12/13 19:46:22 tb Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
if (subj_name == NULL)
return (-1);
log_debug("%s: found CA %s", __func__, subj_name);
+ free(subj_name);
if ((cert = ca_by_issuer(store->ca_certs,
subj, &id)) != NULL) {
return (-1);
log_debug("%s: found local certificate %s", __func__,
subj_name);
+ free(subj_name);
if ((buf = ca_x509_serialize(cert)) == NULL)
return (-1);
if (subj_name == NULL)
return (-1);
log_debug("%s: %s", __func__, subj_name);
+ free(subj_name);
if (ibuf_add(env->sc_certreq, md, len) != 0) {
ibuf_release(env->sc_certreq);
if (subj_name == NULL)
goto err;
log_debug("%s: %s %.100s", __func__, subj_name, errstr);
+ free(subj_name);
}
err: