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
ba7f7046
Commit
ba7f7046
authored
Jan 16, 2011
by
Andrew Nguyen
Committed by
Alexandre Julliard
Jan 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Free environment block in the child process when it is unused.
parent
e6da2aec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
process.c
dlls/kernel32/tests/process.c
+6
-4
No files found.
dlls/kernel32/tests/process.c
View file @
ba7f7046
...
...
@@ -249,8 +249,8 @@ static void doChild(const char* file, const char* option)
STARTUPINFOA
siA
;
STARTUPINFOW
siW
;
int
i
;
char
*
ptrA
;
WCHAR
*
ptrW
;
char
*
ptrA
,
*
ptrA_save
;
WCHAR
*
ptrW
,
*
ptrW_save
;
char
bufA
[
MAX_PATH
];
WCHAR
bufW
[
MAX_PATH
];
HANDLE
hFile
=
CreateFileA
(
file
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
0
);
...
...
@@ -311,7 +311,7 @@ static void doChild(const char* file, const char* option)
childPrintf
(
hFile
,
"CommandLineW=%s
\n\n
"
,
encodeW
(
GetCommandLineW
()));
/* output of environment (Ansi) */
ptrA
=
GetEnvironmentStringsA
();
ptrA
_save
=
ptrA
=
GetEnvironmentStringsA
();
if
(
ptrA
)
{
char
env_var
[
MAX_LISTED_ENV_VAR
];
...
...
@@ -326,10 +326,11 @@ static void doChild(const char* file, const char* option)
ptrA
+=
strlen
(
ptrA
)
+
1
;
}
childPrintf
(
hFile
,
"len=%d
\n\n
"
,
i
);
FreeEnvironmentStringsA
(
ptrA_save
);
}
/* output of environment (Unicode) */
ptrW
=
GetEnvironmentStringsW
();
ptrW
_save
=
ptrW
=
GetEnvironmentStringsW
();
if
(
ptrW
)
{
WCHAR
env_var
[
MAX_LISTED_ENV_VAR
];
...
...
@@ -345,6 +346,7 @@ static void doChild(const char* file, const char* option)
ptrW
+=
lstrlenW
(
ptrW
)
+
1
;
}
childPrintf
(
hFile
,
"len=%d
\n\n
"
,
i
);
FreeEnvironmentStringsW
(
ptrW_save
);
}
childPrintf
(
hFile
,
"[Misc]
\n
"
);
...
...
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