From cb0daf73fdb03e928eaad2e1bfcb49401ba7a792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Thu, 5 May 2005 20:19:01 +0000 Subject: [PATCH] RtlFreeUnicodeString -> ExFreePool changes svn path=/trunk/; revision=15021 --- reactos/ntoskrnl/ex/init.c | 10 +++++----- reactos/ntoskrnl/io/arcname.c | 10 +++++----- reactos/ntoskrnl/io/driver.c | 26 +++++++++++++------------- reactos/ntoskrnl/io/irp.c | 2 +- reactos/ntoskrnl/ob/symlink.c | 4 ++-- reactos/ntoskrnl/rtl/capture.c | 2 +- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/reactos/ntoskrnl/ex/init.c b/reactos/ntoskrnl/ex/init.c index 23609eff1d3..a5bc7acccdd 100644 --- a/reactos/ntoskrnl/ex/init.c +++ b/reactos/ntoskrnl/ex/init.c @@ -125,14 +125,14 @@ InitSystemSharedUserPage (PCSZ ParameterLine) &ObjectAttributes); /* Free the String */ - RtlFreeUnicodeString(&ArcName); + ExFreePool(ArcName.Buffer); /* Check for Success */ if (!NT_SUCCESS(Status)) { /* Free the Strings */ RtlFreeUnicodeString(&BootPath); - RtlFreeUnicodeString(&ArcDeviceName); + ExFreePool(ArcDeviceName.Buffer); CPRINT("NtOpenSymbolicLinkObject() failed (Status %x)\n", Status); KEBUGCHECK(0); } @@ -148,7 +148,7 @@ InitSystemSharedUserPage (PCSZ ParameterLine) /* Free the Strings */ RtlFreeUnicodeString(&BootPath); - RtlFreeUnicodeString(&ArcDeviceName); + ExFreePool(ArcDeviceName.Buffer); CPRINT("NtQuerySymbolicLinkObject() failed (Status %x)\n", Status); KEBUGCHECK(0); } @@ -209,8 +209,8 @@ InitSystemSharedUserPage (PCSZ ParameterLine) /* Free all the Strings we have in memory */ RtlFreeUnicodeString (&BootPath); - RtlFreeUnicodeString (&DriveDeviceName); - RtlFreeUnicodeString (&ArcDeviceName); + ExFreePool(DriveDeviceName.Buffer); + ExFreePool(ArcDeviceName.Buffer); /* Make sure we found the Boot Drive */ if (BootDriveFound == FALSE) { diff --git a/reactos/ntoskrnl/io/arcname.c b/reactos/ntoskrnl/io/arcname.c index d47003e6780..64fd609d097 100644 --- a/reactos/ntoskrnl/io/arcname.c +++ b/reactos/ntoskrnl/io/arcname.c @@ -413,15 +413,15 @@ IoCreateSystemRootLink(PCHAR ParameterLine) if (!NT_SUCCESS(Status)) { RtlFreeUnicodeString(&BootPath); - RtlFreeUnicodeString(&DeviceName); + ExFreePool(DeviceName.Buffer); CPRINT("ZwOpenSymbolicLinkObject() '%wZ' failed (Status %x)\n", &ArcName, Status); - RtlFreeUnicodeString(&ArcName); + ExFreePool(ArcName.Buffer); return(Status); } - RtlFreeUnicodeString(&ArcName); + ExFreePool(ArcName.Buffer); Status = ZwQuerySymbolicLinkObject(Handle, &DeviceName, @@ -430,7 +430,7 @@ IoCreateSystemRootLink(PCHAR ParameterLine) if (!NT_SUCCESS(Status)) { RtlFreeUnicodeString(&BootPath); - RtlFreeUnicodeString(&DeviceName); + ExFreePool(DeviceName.Buffer); CPRINT("ZwQuerySymbolicObject() failed (Status %x)\n", Status); @@ -450,7 +450,7 @@ IoCreateSystemRootLink(PCHAR ParameterLine) Status = IoCreateSymbolicLink(&LinkName, &DeviceName); - RtlFreeUnicodeString (&DeviceName); + ExFreePool(DeviceName.Buffer); if (!NT_SUCCESS(Status)) { CPRINT("IoCreateSymbolicLink() failed (Status %x)\n", diff --git a/reactos/ntoskrnl/io/driver.c b/reactos/ntoskrnl/io/driver.c index 9b8f28da491..092ac55f3e9 100644 --- a/reactos/ntoskrnl/io/driver.c +++ b/reactos/ntoskrnl/io/driver.c @@ -188,7 +188,7 @@ IopDeleteDriver(PVOID ObjectBody) DPRINT("IopDeleteDriver(ObjectBody %x)\n", ObjectBody); ExFreePool(Object->DriverExtension); - RtlFreeUnicodeString(&Object->DriverName); + ExFreePool(Object->DriverName.Buffer); OldIrql = KeRaiseIrqlToDpcLevel(); @@ -197,7 +197,7 @@ IopDeleteDriver(PVOID ObjectBody) DriverExtension = NextDriverExtension) { NextDriverExtension = DriverExtension->Link; - ExFreePool(DriverExtension); + ExFreePoolWithTag(DriverExtension, TAG_DRIVER_EXTENSION); } KfLowerIrql(OldIrql); @@ -358,7 +358,7 @@ IopNormalizeImagePath( wcscpy(ImagePath->Buffer, L"\\SystemRoot\\"); wcscat(ImagePath->Buffer, InputImagePath.Buffer); - RtlFreeUnicodeString(&InputImagePath); + ExFreePool(InputImagePath.Buffer); } return STATUS_SUCCESS; @@ -496,7 +496,7 @@ IopLoadServiceModule( Status = STATUS_IMAGE_ALREADY_LOADED; } - RtlFreeUnicodeString(&ServiceImagePath); + ExFreePool(ServiceImagePath.Buffer); /* * Now check if the module was loaded successfully. @@ -908,8 +908,8 @@ IopCreateServiceListEntry(PUNICODE_STRING ServiceName) NULL); if (!NT_SUCCESS(Status) || Service->Start > 1) { - RtlFreeUnicodeString(&Service->ServiceGroup); - RtlFreeUnicodeString(&Service->ImagePath); + ExFreePool(Service->ServiceGroup.Buffer); + ExFreePool(Service->ImagePath.Buffer); ExFreePool(Service); return(Status); } @@ -1065,7 +1065,7 @@ IoDestroyDriverList(VOID) { CurrentGroup = CONTAINING_RECORD(GroupEntry, SERVICE_GROUP, GroupListEntry); - RtlFreeUnicodeString(&CurrentGroup->GroupName); + ExFreePool(CurrentGroup->GroupName.Buffer); RemoveEntryList(GroupEntry); if (CurrentGroup->TagArray) { @@ -1082,10 +1082,10 @@ IoDestroyDriverList(VOID) { CurrentService = CONTAINING_RECORD(ServiceEntry, SERVICE, ServiceListEntry); - RtlFreeUnicodeString(&CurrentService->ServiceName); - RtlFreeUnicodeString(&CurrentService->RegistryPath); - RtlFreeUnicodeString(&CurrentService->ServiceGroup); - RtlFreeUnicodeString(&CurrentService->ImagePath); + ExFreePool(CurrentService->ServiceName.Buffer); + ExFreePool(CurrentService->RegistryPath.Buffer); + ExFreePool(CurrentService->ServiceGroup.Buffer); + ExFreePool(CurrentService->ImagePath.Buffer); RemoveEntryList(ServiceEntry); ExFreePool(CurrentService); @@ -1547,7 +1547,7 @@ IopUnloadDriver(PUNICODE_STRING DriverServiceName, BOOLEAN UnloadPnpDrivers) * Free the service path */ - RtlFreeUnicodeString(&ImagePath); + ExFreePool(ImagePath.Buffer); /* * Unload the module and release the references to the device object @@ -1865,7 +1865,7 @@ NtLoadDriver(IN PUNICODE_STRING DriverServiceName) if (!NT_SUCCESS(Status)) { DPRINT("RtlQueryRegistryValues() failed (Status %lx)\n", Status); - RtlFreeUnicodeString(&ImagePath); + ExFreePool(ImagePath.Buffer); goto ReleaseCapturedString; } diff --git a/reactos/ntoskrnl/io/irp.c b/reactos/ntoskrnl/io/irp.c index 91813e67376..5cdc17e764c 100644 --- a/reactos/ntoskrnl/io/irp.c +++ b/reactos/ntoskrnl/io/irp.c @@ -17,7 +17,7 @@ /* GLOBALS *******************************************************************/ #define TAG_IRP TAG('I', 'R', 'P', ' ') -#define TAG_SYS_BUF TAG('I', 'o', ' ' , ' ') +#define TAG_SYS_BUF TAG('S', 'Y', 'S' , 'B') /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/ob/symlink.c b/reactos/ntoskrnl/ob/symlink.c index 4f7462b6c00..bffcebabdef 100644 --- a/reactos/ntoskrnl/ob/symlink.c +++ b/reactos/ntoskrnl/ob/symlink.c @@ -72,7 +72,7 @@ ObpDeleteSymbolicLink(PVOID ObjectBody) { PSYMLINK_OBJECT SymlinkObject = (PSYMLINK_OBJECT)ObjectBody; - RtlFreeUnicodeString(&SymlinkObject->TargetName); + ExFreePool(SymlinkObject->TargetName.Buffer); } @@ -129,7 +129,7 @@ ObpParseSymbolicLink(PVOID Object, } /* transfer target path buffer into FullPath */ - RtlFreeUnicodeString(FullPath); + ExFreePool(FullPath->Buffer); FullPath->Length = TargetPath.Length; FullPath->MaximumLength = TargetPath.MaximumLength; FullPath->Buffer = TargetPath.Buffer; diff --git a/reactos/ntoskrnl/rtl/capture.c b/reactos/ntoskrnl/rtl/capture.c index aebacafb8e9..f569d232762 100644 --- a/reactos/ntoskrnl/rtl/capture.c +++ b/reactos/ntoskrnl/rtl/capture.c @@ -123,7 +123,7 @@ RtlReleaseCapturedUnicodeString(IN PUNICODE_STRING CapturedString, { if(CurrentMode != KernelMode || CaptureIfKernel ) { - RtlFreeUnicodeString(CapturedString); + ExFreePool(CapturedString->Buffer); } }