Jacek Caban (@jacek) commented about dlls/urlmon/tests/sec_mgr.c:
+ + hres = IPersistFile_GetClassID(persist_file, &clsid); + ok(hres == S_OK, + "Unexpected GetClassId result: 0x%08lx, expected result: 0x%08lx\n", + hres, S_OK); + ok(IsEqualCLSID(&clsid, &CLSID_PersistentZoneIdentifier), + "Unexpected GetClassId id: %s, expected class id: %s\n", + debugstr_guid(&clsid), debugstr_guid(&CLSID_PersistentZoneIdentifier)); + + hres = IPersistFile_GetCurFile(persist_file, &file_name); + ok(hres == E_NOTIMPL, + "Unexpected GetCurFile result: 0x%08lx, expected result: 0x%08lx\n", hres, E_NOTIMPL); + ok(!file_name, + "Unexpected GetCurFile file name: %s, expected NULL\n", debugstr_w(file_name)); + if (hres == S_OK || hres == S_FALSE) + free(file_name); Technically, this should use `CoTaskMemFree`, but since we expect the function to always fail, there is no need to worry about freeing the result at all. You may just remove this.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8459#note_110167