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

ALSA Memory Leaks #447

Open
mttjcksn opened this issue Nov 27, 2024 · 1 comment
Open

ALSA Memory Leaks #447

mttjcksn opened this issue Nov 27, 2024 · 1 comment

Comments

@mttjcksn
Copy link
Contributor

Hi there,

We have encountered a large number of possible memory leaks reported by valgrind memcheck using the ALSA backend in our application.
This can can replicated with the audioprobe and record examples. See the memcheck logs for those test apps:

audioprobe-mem.log
record-mem.log

In this note, alsa-project state that not calling snd_config_update_free_global() after all snd_*_open*() calls can lead to leaks. This call frees the global configuration tree and sets snd_config to null, as documented here.

Sure enough, when I edit RtAudio.cpp to ensure that this is done where appropriate, the memcheck logs for audioprobe and record are clean. See below:

audioprobe-mem-fix.log
record-mem-fix.log

Has this been addressed before? I can create a PR if required.

Many thanks

@garyscavone
Copy link
Contributor

garyscavone commented Nov 27, 2024 via email

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

No branches or pull requests

2 participants