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 process_darwin_cgo #1360

Merged
merged 1 commit into from Oct 9, 2022

Conversation

bduffany
Copy link
Contributor

@bduffany bduffany commented Oct 4, 2022

NumThreadsWithContext, TimesWithContext, and MemoryInfoWithContext were calling C.malloc but not calling C.free on the returned pointer, causing a leak. This change fixes that.

@bduffany bduffany changed the title Fix memory leaks in darwin_cgo Fix memory leaks in process_darwin_cgo Oct 4, 2022
Copy link
Owner

@shirou shirou left a comment

Choose a reason for hiding this comment

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

Great catch! I can not check on darwin, but this PR does fix the leaks. Thank you!

@shirou shirou merged commit 400a453 into shirou:master Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants