[KS]
[reactos.git] / reactos / drivers / ksfilter / ks / topology.c
index 5b228ad..e507eb7 100644 (file)
@@ -30,7 +30,7 @@ KspCreateObjectType(
     Name.MaximumLength = wcslen(ObjectType) * sizeof(WCHAR) + CreateParametersSize +  2 * sizeof(WCHAR);
     Name.MaximumLength += sizeof(WCHAR);
     /* acquire request buffer */
-    Name.Buffer = ExAllocatePool(NonPagedPool, Name.MaximumLength);
+    Name.Buffer = AllocateItem(NonPagedPool, Name.MaximumLength);
     /* check for success */
     if (!Name.Buffer)
     {
@@ -68,7 +68,7 @@ KspCreateObjectType(
                           IO_NO_PARAMETER_CHECKING | IO_FORCE_ACCESS_CHECK);
 
     /* free request buffer */
-    ExFreePool(Name.Buffer);
+    FreeItem(Name.Buffer);
     return Status;
 }
 
@@ -200,7 +200,7 @@ KsTopologyPropertyHandler(
 
             KeyName.Length = 0;
             KeyName.MaximumLength = LocalMachine.Length + GuidString.Length + sizeof(WCHAR);
-            KeyName.Buffer = ExAllocatePool(PagedPool, KeyName.MaximumLength);
+            KeyName.Buffer = AllocateItem(PagedPool, KeyName.MaximumLength);
             if (!KeyName.Buffer)
             {
                 Irp->IoStatus.Information = 0;
@@ -217,7 +217,7 @@ KsTopologyPropertyHandler(
             InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, NULL, NULL);
             Status = ZwOpenKey(&hKey, GENERIC_READ, &ObjectAttributes);
 
-            ExFreePool(KeyName.Buffer);
+            FreeItem(KeyName.Buffer);
 
             if (!NT_SUCCESS(Status))
             {
@@ -235,7 +235,7 @@ KsTopologyPropertyHandler(
             }
 
             ASSERT(Size);
-            KeyInfo = (PKEY_VALUE_PARTIAL_INFORMATION) ExAllocatePool(NonPagedPool, Size);
+            KeyInfo = (PKEY_VALUE_PARTIAL_INFORMATION) AllocateItem(NonPagedPool, Size);
             if (!KeyInfo)
             {
                 Status = STATUS_NO_MEMORY;
@@ -245,7 +245,7 @@ KsTopologyPropertyHandler(
             Status = ZwQueryValueKey(hKey, &Name, KeyValuePartialInformation, (PVOID)KeyInfo, Size, &Size);
             if (!NT_SUCCESS(Status))
             {
-                ExFreePool(KeyInfo);
+                FreeItem(KeyInfo);
                 ZwClose(hKey);
                 Irp->IoStatus.Information = 0;
                 break;
@@ -256,14 +256,14 @@ KsTopologyPropertyHandler(
             {
                 Irp->IoStatus.Information = KeyInfo->DataLength + sizeof(WCHAR);
                 Status = STATUS_MORE_ENTRIES;
-                ExFreePool(KeyInfo);
+                FreeItem(KeyInfo);
                 break;
             }
 
             RtlMoveMemory(Irp->UserBuffer, &KeyInfo->Data, KeyInfo->DataLength);
             ((LPWSTR)Irp->UserBuffer)[KeyInfo->DataLength / sizeof(WCHAR)] = L'\0';
              Irp->IoStatus.Information = KeyInfo->DataLength + sizeof(WCHAR);
-            ExFreePool(KeyInfo);
+            FreeItem(KeyInfo);
             break;
         default:
              Irp->IoStatus.Information = 0;