Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ntoskrnl/config/cmapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ CmpIsHiveAlreadyLoaded(IN HANDLE KeyHandle,
if (!NT_SUCCESS(Status)) return Loaded;

/* Don't touch deleted KCBs */
if (KeyBody->KeyControlBlock->Delete) return Loaded;
if (KeyBody->KeyControlBlock->Delete)
{
ObDereferenceObject(KeyBody);
return Loaded;
}

Hive = CONTAINING_RECORD(KeyBody->KeyControlBlock->KeyHive, CMHIVE, Hive);

Expand Down
2 changes: 0 additions & 2 deletions ntoskrnl/io/iomgr/bootlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ IopCreateLogFile(VOID)

DPRINT("IopSaveBootLogToFile() called\n");

ExAcquireResourceExclusiveLite(&IopBootLogResource, TRUE);

RtlInitUnicodeString(&FileName,
L"\\SystemRoot\\rosboot.log");
InitializeObjectAttributes(&ObjectAttributes,
Expand Down
6 changes: 5 additions & 1 deletion ntoskrnl/io/iomgr/iofunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,11 @@ NtLockFile(IN HANDLE FileHandle,
PreviousMode,
(PVOID *)&Event,
NULL);
if (Status != STATUS_SUCCESS) return Status;
if (Status != STATUS_SUCCESS)
{
ObDereferenceObject(FileObject);
return Status;
}
KeClearEvent(Event);
}

Expand Down
3 changes: 1 addition & 2 deletions ntoskrnl/io/pnpmgr/pnpmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,7 @@ IopGetBusTypeGuidIndex(LPGUID BusTypeGuid)

if (!NewList)
{
/* Fail */
ExFreePool(PnpBusTypeGuidList);
/* Fail without destroying existing list data */
goto Quickie;
}

Expand Down
1 change: 1 addition & 0 deletions ntoskrnl/po/power.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ PopSetSystemPowerState(SYSTEM_POWER_STATE PowerState, POWER_ACTION PowerAction)
if (Fdo == DeviceObject)
{
DPRINT("An FDO was not attached\n");
ObDereferenceObject(Fdo);
return STATUS_UNSUCCESSFUL;
}
}
Expand Down
1 change: 1 addition & 0 deletions ntoskrnl/ps/psmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ PsLocateSystemDll(VOID)
&HardErrorParameters,
OptionOk,
&HardErrorResponse);
ZwClose(FileHandle);
return Status;
}

Expand Down