Author: pschweitzer
Date: Sun Nov 27 20:11:30 2016
New Revision: 73399
URL:
http://svn.reactos.org/svn/reactos?rev=73399&view=rev
Log:
[NTOSKRNL]
Don't leak FO reference on failure.
Fixes kmtest:NtCreateSection unloading.
Dedicated to Thomas.
CORE-11819
CORE-12475
Modified:
trunk/reactos/ntoskrnl/mm/section.c
Modified: trunk/reactos/ntoskrnl/mm/section.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Sun Nov 27 20:11:30 2016
@@ -5077,6 +5077,8 @@
if (!NT_SUCCESS(Status) && Status != STATUS_END_OF_FILE)
{
DPRINT1("CC failure: %lx\n", Status);
+ if (FileObject)
+ ObDereferenceObject(FileObject);
return Status;
}
// Caching is initialized...