Skip to content
Snippets Groups Projects
Commit 587eca57 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

We don't need to set tls_certificate to -1 in prep_cfg() because

it's only called from load_cfg() which has already set it to -1.

We also don't need to check prepped twice to make sure it's extra true.
parent afa48491
Branches
Tags
No related merge requests found
Pipeline #5039 passed
......@@ -341,8 +341,6 @@ void prep_cfg(scfg_t* cfg)
for(i=0;i<cfg->total_xedits;i++)
strlwr(cfg->xedit[i]->code);
if (!cfg->prepped)
cfg->tls_certificate = -1;
cfg->prepped=TRUE; /* data prepared for run-time, DO NOT SAVE TO DISK! */
}
......@@ -351,7 +349,7 @@ void free_cfg(scfg_t* cfg)
#if defined(SBBS) && defined(USE_CRYPTLIB)
if(cfg->prepped) {
lock_ssl_cert_write();
if (cfg->tls_certificate != -1 && cfg->prepped) {
if (cfg->tls_certificate != -1) {
cryptDestroyContext(cfg->tls_certificate);
cfg->tls_certificate = -1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment