tinus <o112w8r02@sneakemail.com>
authorFilip Navara <filip.navara@gmail.com>
Mon, 9 May 2005 16:00:21 +0000 (16:00 +0000)
committerFilip Navara <filip.navara@gmail.com>
Mon, 9 May 2005 16:00:21 +0000 (16:00 +0000)
Use ExFreePool instead of RtlFreeUnicodeString.

svn path=/trunk/; revision=15187

reactos/drivers/fs/cdfs/close.c
reactos/drivers/fs/cdfs/create.c

index 6a2be34..9ef0f0e 100644 (file)
@@ -69,7 +69,10 @@ CdfsCloseFile(PDEVICE_EXTENSION DeviceExt,
       CdfsReleaseFCB(DeviceExt, FileObject->FsContext);
     }
 
-  RtlFreeUnicodeString(&Ccb->DirectorySearchPattern);
+  if (Ccb->DirectorySearchPattern.Buffer)
+    {
+      ExFreePool(Ccb->DirectorySearchPattern.Buffer);
+    }
   ExFreePool(Ccb);
 
   return(STATUS_SUCCESS);
index 19a2285..4a96e84 100644 (file)
@@ -183,8 +183,8 @@ CdfsOpenFile(PDEVICE_EXTENSION DeviceExt,
                                     Fcb,
                                     FileObject);
 
-  if (FileName == &AbsFileName)
-    RtlFreeUnicodeString(&AbsFileName);
+  if ((FileName == &AbsFileName) && AbsFileName.Buffer)
+    ExFreePool(AbsFileName.Buffer);
 
   return Status;
 }