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 buffer leak in mkcp transport protocol #3347

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yiitz
Copy link

@yiitz yiitz commented Mar 7, 2025

This PR fixes two issues where buffers were not released.

  1. defer b.Release() not woking because b is always null.

    var b *buf.Buffer
    defer b.Release()

  2. SimpleSegmentWriter.buffer never release.

@yiitz
Copy link
Author

yiitz commented Mar 7, 2025

I'm not sure if it is the same problem here

defer buf.ReleaseMulti(mb)

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.

1 participant