mirror of
https://github.com/wine-mirror/wine
synced 2024-07-08 20:06:18 +00:00
dmusic: Stop leaking instruments on collection release.
This commit is contained in:
parent
572125edf6
commit
4ae866a0a7
|
@ -98,7 +98,18 @@ static ULONG WINAPI collection_Release(IDirectMusicCollection *iface)
|
|||
|
||||
TRACE("(%p): new ref = %lu\n", iface, ref);
|
||||
|
||||
if (!ref) {
|
||||
if (!ref)
|
||||
{
|
||||
struct instrument_entry *instrument_entry;
|
||||
void *next;
|
||||
|
||||
LIST_FOR_EACH_ENTRY_SAFE(instrument_entry, next, &This->instruments, struct instrument_entry, entry)
|
||||
{
|
||||
list_remove(&instrument_entry->entry);
|
||||
IDirectMusicInstrument_Release(instrument_entry->instrument);
|
||||
free(instrument_entry);
|
||||
}
|
||||
|
||||
free(This);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user