[ros-diffs] [hbirr] 14989: - Free always the name string and the completion context in IopDeleteFile.

hbirr at svn.reactos.com hbirr at svn.reactos.com
Thu May 5 13:03:28 CEST 2005


- Free always the name string and the completion context in
IopDeleteFile.  
- Fixed the check for synchronous operations in NtQueryDirectoryFile.
Modified: trunk/reactos/ntoskrnl/io/file.c
  _____  

Modified: trunk/reactos/ntoskrnl/io/file.c
--- trunk/reactos/ntoskrnl/io/file.c	2005-05-05 10:59:34 UTC (rev
14988)
+++ trunk/reactos/ntoskrnl/io/file.c	2005-05-05 11:03:27 UTC (rev
14989)
@@ -227,19 +227,20 @@

             KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE,
NULL);
         }
       
-        /* Clear the file name */  
-        if (FileObject->FileName.Buffer)
-        {
-            ExFreePool(FileObject->FileName.Buffer);
-            FileObject->FileName.Buffer = NULL;
-        }
+    }
+
+    /* Clear the file name */  
+    if (FileObject->FileName.Buffer)
+    {
+       ExFreePool(FileObject->FileName.Buffer);
+       FileObject->FileName.Buffer = NULL;
+    }
         
-        /* Free the completion context */
-        if (FileObject->CompletionContext)
-        {
-            ObDereferenceObject(FileObject->CompletionContext->Port);
-            ExFreePool(FileObject->CompletionContext);
-        }
+    /* Free the completion context */
+    if (FileObject->CompletionContext)
+    {
+       ObDereferenceObject(FileObject->CompletionContext->Port);
+       ExFreePool(FileObject->CompletionContext);
     }
 }
 
@@ -2146,7 +2147,7 @@
    IoStack->Parameters.QueryDirectory.Length = Length;
    
    Status = IoCallDriver(FileObject->DeviceObject,Irp);
-   if (Status==STATUS_PENDING && !(FileObject->Flags &
FO_SYNCHRONOUS_IO))
+   if (Status==STATUS_PENDING && (FileObject->Flags &
FO_SYNCHRONOUS_IO))
      {
  KeWaitForSingleObject(&FileObject->Event,
          Executive,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050505/49c74fe0/attachment.html


More information about the Ros-diffs mailing list