Skip to content

Commit c1a8d8c

Browse files
committed
Revert "*Remove debug call from previous commit"
This reverts commit 16b178c.
1 parent 957e677 commit c1a8d8c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

phlib/kph.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ NTSTATUS KphInstallEx(
348348
if (!NT_SUCCESS(status = NtSetValueKey(keyHandle, &valueName, 0, REG_EXPAND_SZ, fileName.Buffer, (ULONG)fileName.MaximumLength)))
349349
goto CleanupExit;
350350

351+
NtUnloadDriver(&objectName);
351352
status = NtLoadDriver(&objectName);
352353

353354
if (status == STATUS_IMAGE_ALREADY_LOADED || status == STATUS_OBJECT_NAME_COLLISION)
@@ -412,7 +413,9 @@ NTSTATUS KphUninstall(
412413
}
413414

414415
if (NT_SUCCESS(status = NtUnloadDriver(&objectName)))
416+
{
415417
NtDeleteKey(keyHandle);
418+
}
416419

417420
PhDereferenceObject(keyName);
418421
NtClose(keyHandle);

0 commit comments

Comments
 (0)