mirror of
https://github.com/reactos/reactos.git
synced 2025-07-14 20:04:15 +00: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:
parent
4f0495a525
commit
a2e0ee8993
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue