Skip to content

fix: leaks#96

Merged
richard-ramos merged 1 commit into
mainfrom
fix/leaks
Jun 30, 2026
Merged

fix: leaks#96
richard-ramos merged 1 commit into
mainfrom
fix/leaks

Conversation

@richard-ramos

@richard-ramos richard-ramos commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Fix native resource leaks in QUIC/TLS lifecycle paths:

  • release both the returned certificate-chain stack and its X509 references
  • clean up SSL_CTX, parsed certificates, and keys when SSL context setup fails before ownership is transferred
  • destroy partially initialized client/server contexts when engine creation fails
  • close endpoint resources if endpoint construction fails after opening UDP transport
  • clear connection-held callbacks/futures on close to release references sooner

Affected Areas

  • Transports
    QUIC context, endpoint, and connection cleanup paths.

Impact on Library Users

No API changes. This reduces retained native and Nim-side resources in failure and close paths.

Risk Assessment

Low. The changes are scoped to cleanup paths and ownership handoff around existing QUIC/TLS resources.

Copilot AI review requested due to automatic review settings June 26, 2026 19:26
@richard-ramos
richard-ramos requested a review from a team as a code owner June 26, 2026 19:26
@richard-ramos
richard-ramos requested review from gmelodie and vladopajic and removed request for a team June 26, 2026 19:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gmelodie gmelodie left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a mazing

@richard-ramos
richard-ramos merged commit 7ebc52e into main Jun 30, 2026
21 checks passed
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

Successfully merging this pull request may close these issues.

4 participants