Skip to content

Commit

Permalink
fix cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers committed Jun 3, 2024
1 parent 78ea67d commit 01576d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tls/openssl/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ int tls_add_cafile_path(struct tls *tls, const char *cafile,
return ENOTDIR;
}

tls->cafile = mem_deref(tls->cafile);
tls->capath = mem_deref(tls->capath);

str_dup(&tls->cafile, cafile);
str_dup(&tls->capath, capath);

Expand Down Expand Up @@ -1967,6 +1970,8 @@ static void tls_cert_destructor(void *arg)
struct tls_cert *uc = arg;

mem_deref(uc->host);
if (uc->ctx)
SSL_CTX_free(uc->ctx);
}


Expand Down

0 comments on commit 01576d9

Please sign in to comment.