Jacek Caban (@jacek) commented about dlls/urlmon/tests/sec_mgr.c:
+ wsprintfW(tmp_file_path, L"%s\\%s", tmp_dir, test.cur_file.name); + file_path = tmp_file_path; + } + else + file_path = NULL; + + hres = IPersistFile_GetCurFile(persist_file_save, &file_name); + ok(hres == test.cur_file.hres, + "%lu) Unexpected GetCurFile result: 0x%08lx, expected result: 0x%08lx\n", + i, hres, test.cur_file.hres); + ok(!lstrcmpW(file_name, file_path), + "%lu) Unexpected GetCurFile file name: %s, expected file name: %s\n", + i, debugstr_w(file_name), debugstr_w(file_path)); + + if (hres == S_OK || hres == S_FALSE) + free(file_name); This should use `CoTaskMemFree()`, but given that we don't expect `GetCurFile` to succeed, you may just remove it.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8459#note_109921