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 memory leaks in file::GetContents and file::SetContents #4011

Merged
merged 1 commit into from Dec 2, 2023

Conversation

pjh
Copy link
Contributor

@pjh pjh commented Dec 2, 2023

Calls delete file after closing opened files in file::GetContents and file::SetContents. Documents the need to do so for callers of file::Open and its variants.

Fixes #4010

I've verified this fix using the minimal hello_file example in #4009 but reviewers please let me know how else this should be tested.

@pjh
Copy link
Contributor Author

pjh commented Dec 2, 2023

cc @rachelcao-g

@lperron lperron merged commit 1f32ac1 into google:main Dec 2, 2023
1 check passed
@Mizux Mizux requested a review from lperron December 4, 2023 07:41
@Mizux Mizux added this to the v9.9 milestone Dec 4, 2023
@Mizux Mizux self-assigned this Dec 4, 2023
@Mizux Mizux added Bug Lang: C++ Native implementation issue labels Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Lang: C++ Native implementation issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants