projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29446ab
)
[NTOS:IO]
author
Thomas Faber
<thomas.faber@reactos.org>
Wed, 1 Mar 2017 13:10:52 +0000
(13:10 +0000)
committer
Thomas Faber
<thomas.faber@reactos.org>
Wed, 1 Mar 2017 13:10:52 +0000
(13:10 +0000)
- Avoid event leak in NtQueryInformationFile. CID 716584
svn path=/trunk/; revision=74013
reactos/ntoskrnl/io/iomgr/iofunc.c
patch
|
blob
|
history
diff --git
a/reactos/ntoskrnl/io/iomgr/iofunc.c
b/reactos/ntoskrnl/io/iomgr/iofunc.c
index
9d99a82
..
eb32a4d
100644
(file)
--- a/
reactos/ntoskrnl/io/iomgr/iofunc.c
+++ b/
reactos/ntoskrnl/io/iomgr/iofunc.c
@@
-2240,8
+2240,17
@@
NtQueryInformationFile(IN HANDLE FileHandle,
}
_SEH2_END;
- /* Unlock FO */
- IopUnlockFileObject(FileObject);
+ /* Free the event if we had one */
+ if (LocalEvent)
+ {
+ ExFreePoolWithTag(Event, TAG_IO);
+ }
+
+ /* If FO was locked, unlock it */
+ if (FileObject->Flags & FO_SYNCHRONOUS_IO)
+ {
+ IopUnlockFileObject(FileObject);
+ }
/* We're done with FastIO! */
ObDereferenceObject(FileObject);