Skip to content

Commit 5df053a

Browse files
committed
Clean up on failure
1 parent f057677 commit 5df053a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/modules/rlm_crl/rlm_crl.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,14 +846,16 @@ static int mod_instantiate(module_inst_ctx_t const *mctx)
846846

847847
if (!inst->ca_file && !inst->ca_path) {
848848
cf_log_err(mctx->mi->conf, "Missing ca_file / ca_path option. One or other (or both) must be specified.");
849+
fail:
850+
talloc_free(inst->mutable);
849851
return -1;
850852
}
851853

852854
inst->verify_store = X509_STORE_new();
853855
if (!X509_STORE_load_locations(inst->verify_store, inst->ca_file, inst->ca_path)) {
854856
cf_log_err(mctx->mi->conf, "Failed reading Trusted root CA file \"%s\" and path \"%s\"",
855857
inst->ca_file, inst->ca_path);
856-
return -1;
858+
goto fail;
857859
}
858860

859861
X509_STORE_set_purpose(inst->verify_store, X509_PURPOSE_SSL_CLIENT);

0 commit comments

Comments
 (0)