Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to free certs loaded by ptls_load_certificates? #260

Open
larseggert opened this issue Aug 30, 2019 · 1 comment
Open

How to free certs loaded by ptls_load_certificates? #260

larseggert opened this issue Aug 30, 2019 · 1 comment

Comments

@larseggert
Copy link
Contributor

After calling ptls_load_certificates, how can I free the loaded certificates? (Getting sanitizers warnings on quit.)

@larseggert
Copy link
Contributor Author

larseggert commented Sep 2, 2019

I guess this works, but it feels odd to muck around with the guts of the context struct:

    for (size_t i = 0; i < tls_ctx->certificates.count; i++)
        free(tls_ctx->certificates.list[i].base);
    free(tls_ctx->certificates.list);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant