Module: wine Branch: master Commit: ac832b97aeb639d178fdea4986a83c7f935fd9b8 URL: https://gitlab.winehq.org/wine/wine/-/commit/ac832b97aeb639d178fdea4986a83c7...
Author: Rémi Bernon rbernon@codeweavers.com Date: Fri Oct 6 15:28:05 2023 +0200
dmime: Free all pending messages after CloseDown.
---
dlls/dmime/performance.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index a5655f4b2df..5c3e1f17a97 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -948,6 +948,8 @@ static HRESULT WINAPI performance_AdjustTime(IDirectMusicPerformance8 *iface, RE static HRESULT WINAPI performance_CloseDown(IDirectMusicPerformance8 *iface) { struct performance *This = impl_from_IDirectMusicPerformance8(iface); + struct message *message, *next; + HRESULT hr;
FIXME("(%p): semi-stub\n", This);
@@ -956,6 +958,16 @@ static HRESULT WINAPI performance_CloseDown(IDirectMusicPerformance8 *iface) This->procThreadTicStarted = FALSE; CloseHandle(This->procThread); } + + LIST_FOR_EACH_ENTRY_SAFE(message, next, &This->messages, struct message, entry) + { + list_remove(&message->entry); + list_init(&message->entry); + + if (FAILED(hr = IDirectMusicPerformance8_FreePMsg(iface, &message->msg))) + WARN("Failed to free message %p, hr %#lx\n", message, hr); + } + if (This->master_clock) { IReferenceClock_Release(This->master_clock);