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

dirs-sys: migrate winapi to windows-sys #64

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

utkarshgupta137
Copy link

Cherry-picked the following commits from dirs-dev, bringing this fork in sync with it (except for our own changes):

lberrymage and others added 2 commits March 18, 2023 17:20
The documentation for SHGetKnownFolderPath states:

> The calling process is responsible for freeing this resource once it
> is no longer needed by calling CoTaskMemFree, whether
> SHGetKnownFolderPath succeeds or not.

Currently the known_folder() function only calls CoTaskMemFree when
SHGetKnownFolderPath returns S_OK, causing a memory leak whenever
SHGetKnownFolderPath fails.

References:

https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath
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.

2 participants