minor error handling fixes
Modified: trunk/reactos/lib/devmgr/advprop.c
_____
Modified: trunk/reactos/lib/devmgr/advprop.c
--- trunk/reactos/lib/devmgr/advprop.c 2005-12-27 23:05:34 UTC (rev
20383)
+++ trunk/reactos/lib/devmgr/advprop.c 2005-12-27 23:17:43 UTC (rev
20384)
@@ -808,17 +808,13 @@
else
{
/* cleanup, we were unable to get the device
property sheets */
+ iPage = nDriverPages;
dap->nDevPropSheets -= nDriverPages;
nDriverPages = 0;
- if (dap->nDevPropSheets == 0)
- {
- HeapFree(GetProcessHeap(),
- 0,
- dap->DevPropSheets);
- dap->DevPropSheets = NULL;
- }
}
}
+ else
+ iPage = 0;
/* add the driver page if necessary */
if (dap->HasDriverPage)
@@ -841,6 +837,7 @@
else
{
dap->pDestroyPropertySheetPage(dap->DevPropSheets[iPage]);
+ dap->DevPropSheets[iPage] = NULL;
}
}
}
@@ -1105,7 +1102,7 @@
DevIdSize = (DWORD)wcslen(lpDeviceID) + 1;
}
- if (lpMachineName != NULL)
+ if (lpMachineName != NULL && lpMachineName[0] != L'\0')
{
CONFIGRET cr = CM_Connect_Machine(lpMachineName,
&hMachine);
Show replies by date