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();
|
PreviousMode = ExGetPreviousMode();
|
||||||
Status = RtlCaptureUnicodeString(&CapturedFileName,
|
|
||||||
PreviousMode,
|
|
||||||
PagedPool,
|
|
||||||
FALSE,
|
|
||||||
FileName);
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
return(Status);
|
|
||||||
}
|
|
||||||
if (PreviousMode == UserMode)
|
if (PreviousMode == UserMode)
|
||||||
{
|
{
|
||||||
_SEH_TRY
|
_SEH_TRY
|
||||||
|
@ -795,6 +787,16 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName,
|
||||||
SafeInitialSize = *InitialSize;
|
SafeInitialSize = *InitialSize;
|
||||||
SafeMaximumSize = *MaximumSize;
|
SafeMaximumSize = *MaximumSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Status = RtlCaptureUnicodeString(&CapturedFileName,
|
||||||
|
PreviousMode,
|
||||||
|
PagedPool,
|
||||||
|
FALSE,
|
||||||
|
FileName);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
return(Status);
|
||||||
|
}
|
||||||
|
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
&CapturedFileName,
|
&CapturedFileName,
|
||||||
|
|
Loading…
Reference in a new issue