mirror of
https://github.com/reactos/wine.git
synced 2025-02-13 08:44:54 +00:00
dmloader: Use safe list iterator when clearing the cache (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b9a03b70af
commit
96fd03b269
@ -776,11 +776,11 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_ReleaseObject(IDirectMusicLoader8 *
|
||||
static HRESULT WINAPI IDirectMusicLoaderImpl_ClearCache(IDirectMusicLoader8 *iface, REFGUID class)
|
||||
{
|
||||
IDirectMusicLoaderImpl *This = impl_from_IDirectMusicLoader8(iface);
|
||||
struct cache_entry *obj;
|
||||
struct cache_entry *obj, *obj2;
|
||||
|
||||
TRACE("(%p, %s)\n", This, debugstr_dmguid(class));
|
||||
|
||||
LIST_FOR_EACH_ENTRY(obj, &This->cache, struct cache_entry, entry) {
|
||||
LIST_FOR_EACH_ENTRY_SAFE(obj, obj2, &This->cache, struct cache_entry, entry) {
|
||||
if ((IsEqualGUID(class, &GUID_DirectMusicAllTypes) || IsEqualGUID(class, &obj->Desc.guidClass)) &&
|
||||
(obj->Desc.dwValidData & DMUS_OBJ_LOADED)) {
|
||||
/* basically, wrap to ReleaseObject for each object found */
|
||||
|
Loading…
x
Reference in New Issue
Block a user