mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
NtCreatePagingFile() should release the captured unicode string even if probing the other parameters failed
svn path=/trunk/; revision=13314
This commit is contained in:
parent
a2ea8e6fef
commit
87e84448db
1 changed files with 11 additions and 9 deletions
|
@ -757,15 +757,7 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName,
|
|||
}
|
||||
|
||||
PreviousMode = ExGetPreviousMode();
|
||||
Status = RtlCaptureUnicodeString(&CapturedFileName,
|
||||
PreviousMode,
|
||||
PagedPool,
|
||||
FALSE,
|
||||
FileName);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return(Status);
|
||||
}
|
||||
|
||||
if (PreviousMode == UserMode)
|
||||
{
|
||||
_SEH_TRY
|
||||
|
@ -796,6 +788,16 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName,
|
|||
SafeMaximumSize = *MaximumSize;
|
||||
}
|
||||
|
||||
Status = RtlCaptureUnicodeString(&CapturedFileName,
|
||||
PreviousMode,
|
||||
PagedPool,
|
||||
FALSE,
|
||||
FileName);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return(Status);
|
||||
}
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&CapturedFileName,
|
||||
0,
|
||||
|
|
Loading…
Reference in a new issue