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

[BUG] Unmanaged memory leaks #16

Open
MichaelGrafnetter opened this issue Oct 3, 2023 · 0 comments
Open

[BUG] Unmanaged memory leaks #16

MichaelGrafnetter opened this issue Oct 3, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@MichaelGrafnetter
Copy link

Describe the bug

Greetings, @GuyTe! While implementing a similar functionality in my own project, I noticed that your code does not properly release unmanaged memory pointers returned by the GenerateKDFContext function through the out IntPtr outContext parameter in KdsCli.cs

Expected behavior
Unmanaged memory allocated by the GenerateKDFContext call should be released by the undocumented SIDKeyProvFree native function. If interested, feel free to copy my own implementation of the SafeSidKeyProviderHandle wrapper, which makes sure that the unmanaged memory is released under any circumstances.

@MichaelGrafnetter MichaelGrafnetter added the bug Something isn't working label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant