Zhiyi Zhang (@zhiyi) commented about dlls/win32u/sysparams.c:
while (!NtEnumerateKey( device_key, j++, KeyBasicInformation, key2, sizeof(buffer), &size ))
{
LUID gpu_luid = {0};
if (!(gpu_key = reg_open_key( device_key, key2->Name, key2->NameLength )))
continue;
size = query_reg_value( gpu_key, class_guidW, value, sizeof(buffer) );
if (size != sizeof(guid_devclass_displayW)
|| wcscmp( (WCHAR *)value->Data, guid_devclass_displayW ))
{
NtClose( gpu_key );
continue;
}
if (!(gpu = calloc( 1, sizeof(*gpu) )))
You're allocating gpu twice. The first time here and the second time at line 1786.