mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +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
|
||||
|
@ -795,6 +787,16 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName,
|
|||
SafeInitialSize = *InitialSize;
|
||||
SafeMaximumSize = *MaximumSize;
|
||||
}
|
||||
|
||||
Status = RtlCaptureUnicodeString(&CapturedFileName,
|
||||
PreviousMode,
|
||||
PagedPool,
|
||||
FALSE,
|
||||
FileName);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return(Status);
|
||||
}
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&CapturedFileName,
|
||||
|
|
Loading…
Reference in a new issue