[PATCH] dmloader: Use safe list iterator when clearing the cache (Coverity)
Nikolay Sivov
nsivov at codeweavers.com
Mon Aug 7 02:34:50 CDT 2017
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/dmloader/loader.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/dmloader/loader.c b/dlls/dmloader/loader.c
index e44d2b9fa7..10a2151fcb 100644
--- a/dlls/dmloader/loader.c
+++ b/dlls/dmloader/loader.c
@@ -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 */
--
2.13.2
More information about the wine-patches
mailing list