Clean up.

svn path=/trunk/; revision=13795
This commit is contained in:
James Tabor 2005-03-02 07:11:26 +00:00
parent 6bcdd89778
commit c8e6164e8c

View file

@ -820,7 +820,6 @@ ObpGetNextHandleByProcessCount(PSYSTEM_HANDLE_TABLE_ENTRY_INFO pshi,
/* Class 16 - Handle Information */ /* Class 16 - Handle Information */
QSI_DEF(SystemHandleInformation) QSI_DEF(SystemHandleInformation)
{ {
PSYSTEM_HANDLE_INFORMATION Shi = PSYSTEM_HANDLE_INFORMATION Shi =
(PSYSTEM_HANDLE_INFORMATION) Buffer; (PSYSTEM_HANDLE_INFORMATION) Buffer;
@ -845,6 +844,18 @@ QSI_DEF(SystemHandleInformation)
do do
{ {
hCount = hCount + ObpGetHandleCountByHandleTable(&pr->HandleTable); hCount = hCount + ObpGetHandleCountByHandleTable(&pr->HandleTable);
pr = PsGetNextProcess(pr);
if ((pr == syspr) || (pr == NULL))
break;
} while ((pr != syspr) && (pr != NULL));
DPRINT("SystemHandleInformation 2\n");
if (pr != NULL)
{
ObDereferenceObject(pr);
}
curSize = sizeof(SYSTEM_HANDLE_INFORMATION)+ curSize = sizeof(SYSTEM_HANDLE_INFORMATION)+
( (sizeof(SYSTEM_HANDLE_TABLE_ENTRY_INFO) * hCount) - ( (sizeof(SYSTEM_HANDLE_TABLE_ENTRY_INFO) * hCount) -
@ -854,26 +865,10 @@ QSI_DEF(SystemHandleInformation)
if (curSize > Size) if (curSize > Size)
{ {
DPRINT1("SystemHandleInformation 2\n");
*ReqSize = curSize; *ReqSize = curSize;
if (pr != NULL)
{
ObDereferenceObject(pr);
}
return (STATUS_INFO_LENGTH_MISMATCH); return (STATUS_INFO_LENGTH_MISMATCH);
} }
pr = PsGetNextProcess(pr);
if ((pr == syspr) || (pr == NULL))
break;
} while ((pr != syspr) && (pr != NULL));
if (pr != NULL)
{
ObDereferenceObject(pr);
}
DPRINT("SystemHandleInformation 3\n"); DPRINT("SystemHandleInformation 3\n");
/* Now get Handles from all processs. */ /* Now get Handles from all processs. */