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

fix: properly free ssl session and ssl context #1049

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

rept1d
Copy link
Contributor

@rept1d rept1d commented Dec 20, 2023

Changes:

  • Ensure that SSL_CTX is freed with SSL_CTX_free by using std::unique_ptr with custom deleter. Previously was leaking.
  • Ensure that SSL is freed with SSL_free in ssl_client::cleanup(). Previously was leaking.
  • Remove useless try-catch. If it failed to allocate, you have nothing to deallocate. The assignment doesn't even happen in this case, an exception is thrown when evaluating the right side.

Code change checklist

  • I have ensured that all methods and functions are fully documented using doxygen style comments.
  • My code follows the coding style guide.
  • I tested that my change works before raising the PR.
  • I have ensured that I did not break any existing API calls.
  • I have not built my pull request using AI, a static analysis tool or similar without any human oversight.

Copy link

netlify bot commented Dec 20, 2023

Deploy Preview for dpp-dev ready!

Name Link
🔨 Latest commit 11a1cfb
🔍 Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/65824766cd936700092ee93e
😎 Deploy Preview https://deploy-preview-1049--dpp-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the code Improvements or additions to code. label Dec 20, 2023
@braindigitalis braindigitalis merged commit e5991da into brainboxdotcc:dev Dec 20, 2023
43 checks passed
@rept1d rept1d mentioned this pull request Dec 20, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Improvements or additions to code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants