mirror of
https://github.com/reactos/reactos.git
synced 2026-07-07 01:44:20 +08:00
don't leak the captured file name in NtCreatePagingFile() when probing the other parameters failed
svn path=/trunk/; revision=13582
This commit is contained in:
@@ -775,6 +775,7 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName,
|
||||
}
|
||||
|
||||
PreviousMode = ExGetPreviousMode();
|
||||
|
||||
Status = RtlCaptureUnicodeString(&CapturedFileName,
|
||||
PreviousMode,
|
||||
PagedPool,
|
||||
@@ -805,6 +806,9 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName,
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
RtlReleaseCapturedUnicodeString(&CapturedFileName,
|
||||
PreviousMode,
|
||||
FALSE);
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
@@ -834,6 +838,7 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName,
|
||||
CreateFileTypeNone,
|
||||
NULL,
|
||||
SL_OPEN_PAGING_FILE | IO_NO_PARAMETER_CHECKING);
|
||||
|
||||
RtlReleaseCapturedUnicodeString(&CapturedFileName,
|
||||
PreviousMode,
|
||||
FALSE);
|
||||
|
||||
Reference in New Issue
Block a user