NtCreatePagingFile() should release the captured unicode string even if
probing the other parameters failed
Modified: trunk/reactos/ntoskrnl/mm/pagefile.c
_____
Modified: trunk/reactos/ntoskrnl/mm/pagefile.c
--- trunk/reactos/ntoskrnl/mm/pagefile.c 2005-01-26 14:15:38 UTC
(rev 13313)
+++ trunk/reactos/ntoskrnl/mm/pagefile.c 2005-01-26 14:38:27 UTC
(rev 13314)
@@ -757,15 +757,7 @@
}
PreviousMode = ExGetPreviousMode();
- Status = RtlCaptureUnicodeString(&CapturedFileName,
- PreviousMode,
- PagedPool,
- FALSE,
- FileName);
- if (!NT_SUCCESS(Status))
- {
- return(Status);
- }
+
if (PreviousMode == UserMode)
{
_SEH_TRY
@@ -795,6 +787,16 @@
SafeInitialSize = *InitialSize;
SafeMaximumSize = *MaximumSize;
}
+
+ Status = RtlCaptureUnicodeString(&CapturedFileName,
+ PreviousMode,
+ PagedPool,
+ FALSE,
+ FileName);
+ if (!NT_SUCCESS(Status))
+ {
+ return(Status);
+ }
InitializeObjectAttributes(&ObjectAttributes,
&CapturedFileName,
Show replies by date