Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2b03b287
Commit
2b03b287
authored
May 25, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Free the initial process parameters once they are copied.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
78cbc269
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
env.c
dlls/ntdll/env.c
+7
-6
No files found.
dlls/ntdll/env.c
View file @
2b03b287
...
...
@@ -634,7 +634,7 @@ void WINAPI RtlDestroyProcessParameters( RTL_USER_PROCESS_PARAMETERS *params )
void
init_user_process_params
(
void
)
{
WCHAR
*
env
;
SIZE_T
env_size
;
SIZE_T
size
=
0
,
env_size
;
RTL_USER_PROCESS_PARAMETERS
*
new_params
,
*
params
=
NtCurrentTeb
()
->
Peb
->
ProcessParameters
;
UNICODE_STRING
curdir
;
...
...
@@ -671,15 +671,16 @@ void init_user_process_params(void)
new_params
->
dwFlags
=
params
->
dwFlags
;
new_params
->
wShowWindow
=
params
->
wShowWindow
;
NtCurrentTeb
()
->
Peb
->
ProcessParameters
=
params
=
new_params
;
NtCurrentTeb
()
->
Peb
->
ProcessParameters
=
new_params
;
NtFreeVirtualMemory
(
GetCurrentProcess
(),
(
void
**
)
&
params
,
&
size
,
MEM_RELEASE
);
if
(
RtlSetCurrentDirectory_U
(
&
params
->
CurrentDirectory
.
DosPath
))
if
(
RtlSetCurrentDirectory_U
(
&
new_
params
->
CurrentDirectory
.
DosPath
))
{
MESSAGE
(
"wine: could not open working directory %s, starting in the Windows directory.
\n
"
,
debugstr_w
(
params
->
CurrentDirectory
.
DosPath
.
Buffer
));
debugstr_w
(
new_
params
->
CurrentDirectory
.
DosPath
.
Buffer
));
RtlInitUnicodeString
(
&
curdir
,
windows_dir
);
RtlSetCurrentDirectory_U
(
&
curdir
);
}
set_wow64_environment
(
&
params
->
Environment
);
params
->
EnvironmentSize
=
RtlSizeHeap
(
GetProcessHeap
(),
0
,
params
->
Environment
);
set_wow64_environment
(
&
new_
params
->
Environment
);
new_params
->
EnvironmentSize
=
RtlSizeHeap
(
GetProcessHeap
(),
0
,
new_
params
->
Environment
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment