don't leak the captured file name in NtCreatePagingFile() when probing
the other parameters failed
Modified: trunk/reactos/ntoskrnl/mm/pagefile.c
_____
Modified: trunk/reactos/ntoskrnl/mm/pagefile.c
--- trunk/reactos/ntoskrnl/mm/pagefile.c 2005-02-15 13:40:10 UTC
(rev 13581)
+++ trunk/reactos/ntoskrnl/mm/pagefile.c 2005-02-15 14:37:53 UTC
(rev 13582)
@@ -775,6 +775,7 @@
}
PreviousMode = ExGetPreviousMode();
+
Status = RtlCaptureUnicodeString(&CapturedFileName,
PreviousMode,
PagedPool,
@@ -805,6 +806,9 @@
if (!NT_SUCCESS(Status))
{
+ RtlReleaseCapturedUnicodeString(&CapturedFileName,
+ PreviousMode,
+ FALSE);
return Status;
}
}
@@ -834,6 +838,7 @@
CreateFileTypeNone,
NULL,
SL_OPEN_PAGING_FILE |
IO_NO_PARAMETER_CHECKING);
+
RtlReleaseCapturedUnicodeString(&CapturedFileName,
PreviousMode,
FALSE);
Show replies by date