Commit 7de0f1d5 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

setupapi: When freeing an interface, delete it from the registry if its device is a phantom.

parent dadcb201
......@@ -152,6 +152,15 @@ static void SETUPDI_FreeInterfaceInstances(struct InterfaceInstances *instances)
struct InterfaceInfo *ifaceInfo =
(struct InterfaceInfo *)instances->instances[i].Reserved;
if (ifaceInfo->device && ifaceInfo->device->Reserved)
{
struct DeviceInfo *devInfo =
(struct DeviceInfo *)ifaceInfo->device->Reserved;
if (devInfo->phantom)
SetupDiDeleteDeviceInterfaceRegKey(devInfo->set,
&instances->instances[i], 0);
}
HeapFree(GetProcessHeap(), 0, ifaceInfo->referenceString);
HeapFree(GetProcessHeap(), 0, ifaceInfo->symbolicLink);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment