Author: ekohl
Date: Mon Oct 13 18:31:55 2014
New Revision: 64734
URL:
http://svn.reactos.org/svn/reactos?rev=64734&view=rev
Log:
[SETUPAPI]
Load a property sheet extension dll only once, otherwise we might leak module handles.
Modified:
trunk/reactos/dll/win32/setupapi/devclass.c
Modified: trunk/reactos/dll/win32/setupapi/devclass.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/devclas…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/devclass.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/devclass.c [iso-8859-1] Mon Oct 13 18:31:55 2014
@@ -1272,14 +1272,22 @@
if (DeviceInfoData)
{
struct DeviceInfo *devInfo = (struct DeviceInfo
*)DeviceInfoData->Reserved;
- devInfo->hmodDevicePropPageProvider = hModule;
- devInfo->pDevicePropPageProvider = pPropPageProvider;
+
+ if (devInfo->hmodDevicePropPageProvider == NULL)
+ {
+ devInfo->hmodDevicePropPageProvider = hModule;
+ devInfo->pDevicePropPageProvider = pPropPageProvider;
+ }
}
else
{
struct DeviceInfoSet *devInfoSet = (struct DeviceInfoSet *)DeviceInfoSet;
- devInfoSet->hmodClassPropPageProvider = hModule;
- devInfoSet->pClassPropPageProvider = pPropPageProvider;
+
+ if (devInfoSet->hmodClassPropPageProvider == NULL)
+ {
+ devInfoSet->hmodClassPropPageProvider = hModule;
+ devInfoSet->pClassPropPageProvider = pPropPageProvider;
+ }
}
InitialNumberOfPages = PropertySheetHeader->nPages;