mirror of
https://github.com/reactos/reactos.git
synced 2025-07-22 12:44:20 +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();
|
PreviousMode = ExGetPreviousMode();
|
||||||
|
|
||||||
Status = RtlCaptureUnicodeString(&CapturedFileName,
|
Status = RtlCaptureUnicodeString(&CapturedFileName,
|
||||||
PreviousMode,
|
PreviousMode,
|
||||||
PagedPool,
|
PagedPool,
|
||||||
|
@ -805,6 +806,9 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName,
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
RtlReleaseCapturedUnicodeString(&CapturedFileName,
|
||||||
|
PreviousMode,
|
||||||
|
FALSE);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -834,6 +838,7 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName,
|
||||||
CreateFileTypeNone,
|
CreateFileTypeNone,
|
||||||
NULL,
|
NULL,
|
||||||
SL_OPEN_PAGING_FILE | IO_NO_PARAMETER_CHECKING);
|
SL_OPEN_PAGING_FILE | IO_NO_PARAMETER_CHECKING);
|
||||||
|
|
||||||
RtlReleaseCapturedUnicodeString(&CapturedFileName,
|
RtlReleaseCapturedUnicodeString(&CapturedFileName,
|
||||||
PreviousMode,
|
PreviousMode,
|
||||||
FALSE);
|
FALSE);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue