mirror of
https://github.com/tnodir/fort
synced 2024-11-15 10:25:10 +00:00
DriverLoader: Fix freeing loaded file
This commit is contained in:
parent
c8347d90f6
commit
4df123f3aa
@ -94,14 +94,14 @@ static NTSTATUS fort_loader_init(PUNICODE_STRING driverPath)
|
|||||||
DWORD payloadSize = 0;
|
DWORD payloadSize = 0;
|
||||||
status = fort_image_payload(data, dataSize, &payload, &payloadSize);
|
status = fort_image_payload(data, dataSize, &payload, &payloadSize);
|
||||||
|
|
||||||
/* Free the driver file's allocated data */
|
|
||||||
fort_mem_free(data, FORT_LOADER_POOL_TAG);
|
|
||||||
|
|
||||||
/* Load the module driver */
|
/* Load the module driver */
|
||||||
if (NT_SUCCESS(status)) {
|
if (NT_SUCCESS(status)) {
|
||||||
status = LoadModuleFromMemory(&g_loader.module, payload, payloadSize);
|
status = LoadModuleFromMemory(&g_loader.module, payload, payloadSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Free the driver file's allocated data */
|
||||||
|
fort_mem_free(data, FORT_LOADER_POOL_TAG);
|
||||||
|
|
||||||
if (!NT_SUCCESS(status)) {
|
if (!NT_SUCCESS(status)) {
|
||||||
DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL,
|
DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL,
|
||||||
"FORT: Loader Image Payload: Error: %x\n", status);
|
"FORT: Loader Image Payload: Error: %x\n", status);
|
||||||
|
Loading…
Reference in New Issue
Block a user