diff --git a/reactos/ntoskrnl/ex/sysinfo.c b/reactos/ntoskrnl/ex/sysinfo.c index 4a737fff823..2e96cfd16e7 100644 --- a/reactos/ntoskrnl/ex/sysinfo.c +++ b/reactos/ntoskrnl/ex/sysinfo.c @@ -676,6 +676,11 @@ QSI_DEF(SystemProcessInformation) else pCur = pCur + curSize + inLen; } while ((pr != syspr) && (pr != NULL)); + + if(pr != NULL) + { + ObDereferenceObject(pr); + } *ReqSize = ovlSize; return (STATUS_SUCCESS); @@ -859,6 +864,11 @@ QSI_DEF(SystemHandleInformation) if ((pr == syspr) || (pr == NULL)) break; } while ((pr != syspr) && (pr != NULL)); + + if(pr != NULL) + { + ObDereferenceObject(pr); + } DPRINT("SystemHandleInformation 2\n"); @@ -899,6 +909,11 @@ QSI_DEF(SystemHandleInformation) break; } while ((pr != syspr) && (pr != NULL)); + if(pr != NULL) + { + ObDereferenceObject(pr); + } + DPRINT("SystemHandleInformation 4\n"); return (STATUS_SUCCESS);