Rémi Bernon (@rbernon) commented about dlls/windows.system.profile.systemid/main.c:
+static HRESULT get_system_id( IBuffer **system_id, SystemIdentificationSource *system_id_source ) +{ + static const WCHAR *buffer_statics_name = L"Windows.Storage.Streams.Buffer"; + IBufferFactory *buffer_factory = NULL; + IActivationFactory *factory = NULL; + HSTRING str = NULL; + HRESULT hr = WindowsCreateString( buffer_statics_name, wcslen( buffer_statics_name ), &str ); + + FIXME( "returning empty ID.\n" ); + + if (SUCCEEDED(hr)) hr = RoGetActivationFactory( str, &IID_IActivationFactory, (void **)&factory ); + if (SUCCEEDED(hr)) hr = IActivationFactory_QueryInterface( factory, &IID_IBufferFactory, (void **)&buffer_factory ); + if (SUCCEEDED(hr)) hr = IBufferFactory_Create( buffer_factory, 0, system_id ); + if (SUCCEEDED(hr)) + { + IBuffer_AddRef( *system_id ); You already own a reference to system_id here from `IBufferFactory_Create`, no need to add another one as you don't release it in this function.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7864#note_102021