Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
70d67bec
Commit
70d67bec
authored
Jan 21, 2011
by
Andrew Nguyen
Committed by
Alexandre Julliard
Jan 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Free environment strings buffer at the conclusion of the environment tests.
parent
6c8f8a64
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
process.c
dlls/kernel32/tests/process.c
+13
-10
No files found.
dlls/kernel32/tests/process.c
View file @
70d67bec
...
...
@@ -1102,10 +1102,11 @@ static void test_Environment(void)
char
buffer
[
MAX_PATH
];
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
;
char
*
child_env
;
char
*
child_env
;
int
child_env_len
;
char
*
ptr
;
char
*
env
;
char
*
ptr
;
char
*
ptr2
;
char
*
env
;
int
slen
;
memset
(
&
startup
,
0
,
sizeof
(
startup
));
...
...
@@ -1122,7 +1123,8 @@ static void test_Environment(void)
/* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA
(
NULL
,
NULL
,
NULL
,
resfile
);
cmpEnvironment
(
GetEnvironmentStringsA
());
env
=
GetEnvironmentStringsA
();
cmpEnvironment
(
env
);
release_memory
();
assert
(
DeleteFileA
(
resfile
)
!=
0
);
...
...
@@ -1136,7 +1138,7 @@ static void test_Environment(void)
sprintf
(
buffer
,
"
\"
%s
\"
tests/process.c
\"
%s
\"
"
,
selfname
,
resfile
);
child_env_len
=
0
;
ptr
=
GetEnvironmentStringsA
()
;
ptr
=
env
;
while
(
*
ptr
)
{
slen
=
strlen
(
ptr
)
+
1
;
...
...
@@ -1161,13 +1163,13 @@ static void test_Environment(void)
* - PATH (already set above)
* - the directory definitions (=[A-Z]:=)
*/
for
(
env
=
GetEnvironmentStringsA
();
*
env
;
env
+=
strlen
(
env
)
+
1
)
for
(
ptr2
=
env
;
*
ptr2
;
ptr2
+=
strlen
(
ptr2
)
+
1
)
{
if
(
strncmp
(
env
,
"PATH="
,
5
)
!=
0
&&
strncmp
(
env
,
"WINELOADER="
,
11
)
!=
0
&&
!
is_str_env_drive_dir
(
env
))
if
(
strncmp
(
ptr2
,
"PATH="
,
5
)
!=
0
&&
strncmp
(
ptr2
,
"WINELOADER="
,
11
)
!=
0
&&
!
is_str_env_drive_dir
(
ptr2
))
{
strcpy
(
ptr
,
env
);
strcpy
(
ptr
,
ptr2
);
ptr
+=
strlen
(
ptr
)
+
1
;
}
}
...
...
@@ -1181,6 +1183,7 @@ static void test_Environment(void)
cmpEnvironment
(
child_env
);
HeapFree
(
GetProcessHeap
(),
0
,
child_env
);
FreeEnvironmentStringsA
(
env
);
release_memory
();
assert
(
DeleteFileA
(
resfile
)
!=
0
);
}
...
...
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