-
Notifications
You must be signed in to change notification settings - Fork 318
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
PulseAudio OpenStream Memory Leak #968
Comments
Given that you are well placed to test the fix, it would be great if you could try the obvious and report back. @illuusio is an active maintainer/developer of that code so they may be able to help. |
Thank you for reporting this. Seems that there is something. I don't know (as I'm bit not familiar with ASAN) if this is correct |
@RossBencina This drops to Ringbuffer and |
@RossBencina and @illuusio, I can look at this within the next 1-3 months. It's likely a modestly simple fix, but I'm busy with different projects at the moment. The obvious fix may just work. So, illuusio, I can fix this if you haven't fixed it already by the time I get to it. |
It should not be biggies. I'll review if you commit PR. |
LeakSanitizer has helped me find a memory leak in the PaPulseAudio_BlockingInitRingBuffer function that is called by OpenStream. This function calls malloc( size ) that is not freed in CloseStream.
To Reproduce
Expected behavior
There is no leak after program ends.
Actual behavior
LeakSanitizer reports a leak. See attached screenshot.
Desktop (please complete the following information):
Current, git hash - 57aa393
PulseAudio
Additional context
Add any other context about the problem here.
Note: PortAudio is a community supported project. If you have a solution, please create a Pull Request for us to consider.
I strongly suspect this could be fixed by freeing this memory at the end of PaPulseAudio_CloseStreamCb within pa_linux_pulseaudio_cb.c. If I hear no objection, I'll free this malloc'd memory at this location and test my project. If this works for me I can create a Pull Request with this change. Unfortunately I'm not that familiar with git so this may take some time.
The text was updated successfully, but these errors were encountered: