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,35 +844,31 @@ QSI_DEF(SystemHandleInformation)
do do
{ {
hCount = hCount + ObpGetHandleCountByHandleTable(&pr->HandleTable); hCount = hCount + ObpGetHandleCountByHandleTable(&pr->HandleTable);
pr = PsGetNextProcess(pr);
curSize = sizeof(SYSTEM_HANDLE_INFORMATION)+
( (sizeof(SYSTEM_HANDLE_TABLE_ENTRY_INFO) * hCount) -
(sizeof(SYSTEM_HANDLE_TABLE_ENTRY_INFO) ));
Shi->NumberOfHandles = hCount;
if (curSize > Size)
{
DPRINT1("SystemHandleInformation 2\n");
*ReqSize = curSize;
if (pr != NULL)
{
ObDereferenceObject(pr);
}
return (STATUS_INFO_LENGTH_MISMATCH);
}
pr = PsGetNextProcess(pr);
if ((pr == syspr) || (pr == NULL)) if ((pr == syspr) || (pr == NULL))
break; break;
} while ((pr != syspr) && (pr != NULL)); } while ((pr != syspr) && (pr != NULL));
DPRINT("SystemHandleInformation 2\n");
if (pr != NULL) if (pr != NULL)
{ {
ObDereferenceObject(pr); ObDereferenceObject(pr);
} }
curSize = sizeof(SYSTEM_HANDLE_INFORMATION)+
( (sizeof(SYSTEM_HANDLE_TABLE_ENTRY_INFO) * hCount) -
(sizeof(SYSTEM_HANDLE_TABLE_ENTRY_INFO) ));
Shi->NumberOfHandles = hCount;
if (curSize > Size)
{
*ReqSize = curSize;
return (STATUS_INFO_LENGTH_MISMATCH);
}
DPRINT("SystemHandleInformation 3\n"); DPRINT("SystemHandleInformation 3\n");
/* Now get Handles from all processs. */ /* Now get Handles from all processs. */