mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 04:13:32 +00:00
- Free always the name string and the completion context in IopDeleteFile.
- Fixed the check for synchronous operations in NtQueryDirectoryFile. svn path=/trunk/; revision=14989
This commit is contained in:
+14
-13
@@ -227,19 +227,20 @@ IopDeleteFile(PVOID ObjectBody)
|
||||
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 @@ NtQueryDirectoryFile(IN HANDLE FileHandle,
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user