diff --git a/dlls/windowscodecs/metadatahandler.c b/dlls/windowscodecs/metadatahandler.c index 114c3afd8b6..afcff21afc7 100644 --- a/dlls/windowscodecs/metadatahandler.c +++ b/dlls/windowscodecs/metadatahandler.c @@ -557,7 +557,7 @@ static HRESULT LoadUnknownMetadata(IStream *input, const GUID *preferred_vendor, } result = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataItem)); - if (FAILED(hr)) + if (!result) { HeapFree(GetProcessHeap(), 0, data); return E_OUTOFMEMORY;