8000 WASAPI: Fix some memory leaks. by sjoblomj · Pull Request #1189 · mackron/miniaudio · GitHub
[go: up one dir, main page]

Skip to content

WASAPI: Fix some memory leaks. - #1189

Merged
mackron merged 1 commit into
mackron:devfrom
sjoblomj:backport-waspi-memory-leak-fix
Nov 9, 2026
Merged

mackron merged 1 commit into
mackron:devfrom
sjoblomj:backport-waspi-memory-leak-fix

Conversation

@sjoblomj
@sjoblomj sjoblomj commented Nov 2, 2026
Copy link
Copy Markdown
Contributor

WASAPI: fix memory leaks when getting device info

Base branch: dev

Summary

This backports 3a7c48c ("WASAPI: Fix some memory leaks") from dev-0.12, as dev still has both leaks.

ma_context_get_device_info_from_IAudioClient__wasapi() leaks in two places:

  • The mix format. IAudioClient::GetMixFormat() allocates the format, and the caller has to free it with CoTaskMemFree(). Nothing frees it.
  • The device format. IPropertyStore::GetValue() returns the format in a PROPVARIANT, and the caller has to clear it. PropVariantClear() is only called when the device format isn't supported in exclusive mode, so it leaks when it is supported.

@mackron
mackron merged commit 0822f15 into mackron:dev Nov 9, 2026
29 checks passed
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

0