Revert ntoskrnl/cm/regobj.c back to revision 14017
Modified: trunk/reactos/ntoskrnl/cm/regobj.c

Modified: trunk/reactos/ntoskrnl/cm/regobj.c
--- trunk/reactos/ntoskrnl/cm/regobj.c	2005-05-06 11:20:10 UTC (rev 15038)
+++ trunk/reactos/ntoskrnl/cm/regobj.c	2005-05-06 11:53:35 UTC (rev 15039)
@@ -91,7 +91,7 @@
   {
      ExReleaseResourceLite(&CmiRegistryLock);
      KeLeaveCriticalRegion();
-     ExFreePool(KeyName.Buffer);
+     RtlFreeUnicodeString(&KeyName);
      return Status;
   }
   if (FoundObject == NULL)
@@ -107,7 +107,7 @@
 	{
           ExReleaseResourceLite(&CmiRegistryLock);
           KeLeaveCriticalRegion();
-	  ExFreePool(KeyName.Buffer);
+	  RtlFreeUnicodeString(&KeyName);
 	  return(STATUS_UNSUCCESSFUL);
 	}
 
@@ -140,7 +140,7 @@
 		  wcscat(TargetPath.Buffer, EndPtr);
 		}
 
-	      ExFreePool(FullPath->Buffer);
+	      RtlFreeUnicodeString(FullPath);
 	      RtlFreeUnicodeString(&LinkPath);
 	      FullPath->Length = TargetPath.Length;
 	      FullPath->MaximumLength = TargetPath.MaximumLength;
@@ -153,7 +153,7 @@
 
 	      *NextObject = NULL;
 
-	      ExFreePool(KeyName.Buffer);
+	      RtlFreeUnicodeString(&KeyName);
 	      return(STATUS_REPARSE);
 	    }
 	}
@@ -173,7 +173,7 @@
 	{
           ExReleaseResourceLite(&CmiRegistryLock);
           KeLeaveCriticalRegion();
-	  ExFreePool(KeyName.Buffer);
+	  RtlFreeUnicodeString(&KeyName);
 	  return(Status);
 	}
       /* Add the keep-alive reference */
@@ -224,8 +224,8 @@
 		  wcscat(TargetPath.Buffer, EndPtr);
 		}
 
-	      ExFreePool(FullPath->Buffer);
-	      ExFreePool(LinkPath.Buffer);
+	      RtlFreeUnicodeString(FullPath);
+	      RtlFreeUnicodeString(&LinkPath);
 	      FullPath->Length = TargetPath.Length;
 	      FullPath->MaximumLength = TargetPath.MaximumLength;
 	      FullPath->Buffer = TargetPath.Buffer;
@@ -237,7 +237,7 @@
 
 	      *NextObject = NULL;
 
-	      ExFreePool(KeyName.Buffer);
+	      RtlFreeUnicodeString(&KeyName);
 	      return(STATUS_REPARSE);
 	    }
 	}
@@ -258,7 +258,7 @@
 
   *NextObject = FoundObject;
 
-  ExFreePool(KeyName.Buffer);
+  RtlFreeUnicodeString(&KeyName);
 
   return(STATUS_SUCCESS);
 }