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
bba9e5ae
Commit
bba9e5ae
authored
Nov 10, 2023
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use msvcrt heap for allocating envionment data.
Signed-off-by:
Eric Pouech
<
epouech@codeweavers.com
>
parent
740e5ac7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
data.c
dlls/msvcrt/data.c
+3
-12
No files found.
dlls/msvcrt/data.c
View file @
bba9e5ae
...
...
@@ -81,10 +81,7 @@ char ** msvcrt_SnapshotOfEnvironmentA(char **blk)
if
(
*
ptr
!=
'='
)
count
++
;
len
+=
strlen
(
ptr
)
+
1
;
}
if
(
blk
)
blk
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
blk
,
count
*
sizeof
(
char
*
)
+
len
);
else
blk
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
char
*
)
+
len
);
blk
=
realloc
(
blk
,
count
*
sizeof
(
char
*
)
+
len
);
if
(
blk
)
{
...
...
@@ -115,10 +112,8 @@ wchar_t ** msvcrt_SnapshotOfEnvironmentW(wchar_t **wblk)
if
(
*
wptr
!=
'='
)
count
++
;
len
+=
wcslen
(
wptr
)
+
1
;
}
if
(
wblk
)
wblk
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
wblk
,
count
*
sizeof
(
wchar_t
*
)
+
len
*
sizeof
(
wchar_t
));
else
wblk
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
wchar_t
*
)
+
len
*
sizeof
(
wchar_t
));
wblk
=
realloc
(
wblk
,
count
*
sizeof
(
wchar_t
*
)
+
len
*
sizeof
(
wchar_t
));
if
(
wblk
)
{
if
(
count
)
...
...
@@ -466,10 +461,6 @@ void msvcrt_free_args(void)
{
/* FIXME: more things to free */
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT___argv
);
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT___initenv
);
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT___winitenv
);
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT__environ
);
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT__wenviron
);
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT__pgmptr
);
HeapFree
(
GetProcessHeap
(),
0
,
MSVCRT__wpgmptr
);
HeapFree
(
GetProcessHeap
(),
0
,
wargv_expand
);
...
...
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