Skip to content

Commit ecf4001

Browse files
authored
[SETUPAPI] Do not fail enumeration on invalid device interface keys (reactos#7741)
Necessary for drivers, which install multiple device interfaces and all interfaces might not be available for this device. CORE-17285
1 parent 9aa299b commit ecf4001

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

dll/win32/setupapi/interface.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,12 @@ SETUP_CreateInterfaceList(
212212

213213
/* Read SymbolicLink value */
214214
rc = RegQueryValueExW(hReferenceKey, SymbolicLink, NULL, &dwRegType, NULL, &dwLength);
215-
if (rc != ERROR_SUCCESS )
216-
goto cleanup;
215+
if (rc != ERROR_SUCCESS)
216+
{
217+
/* Skip device interface with invalid reference value (i.e. interface not actually available for this device) */
218+
RegCloseKey(hReferenceKey);
219+
continue;
220+
}
217221
if (dwRegType != REG_SZ)
218222
{
219223
rc = ERROR_GEN_FAILURE;

0 commit comments

Comments
 (0)