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
42a2ad20
Commit
42a2ad20
authored
Jul 14, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use malloc() to allocate temporary process data.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
83f9e784
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
process.c
dlls/ntdll/unix/process.c
+4
-4
No files found.
dlls/ntdll/unix/process.c
View file @
42a2ad20
...
@@ -233,7 +233,7 @@ static startup_info_t *create_startup_info( const RTL_USER_PROCESS_PARAMETERS *p
...
@@ -233,7 +233,7 @@ static startup_info_t *create_startup_info( const RTL_USER_PROCESS_PARAMETERS *p
size
=
(
size
+
1
)
&
~
1
;
size
=
(
size
+
1
)
&
~
1
;
*
info_size
=
size
;
*
info_size
=
size
;
if
(
!
(
info
=
RtlAllocateHeap
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
)))
return
NULL
;
if
(
!
(
info
=
calloc
(
size
,
1
)))
return
NULL
;
info
->
debug_flags
=
params
->
DebugFlags
;
info
->
debug_flags
=
params
->
DebugFlags
;
info
->
console_flags
=
params
->
ConsoleFlags
;
info
->
console_flags
=
params
->
ConsoleFlags
;
...
@@ -461,7 +461,7 @@ static ULONG get_env_size( const RTL_USER_PROCESS_PARAMETERS *params, char **win
...
@@ -461,7 +461,7 @@ static ULONG get_env_size( const RTL_USER_PROCESS_PARAMETERS *params, char **win
if
(
!*
winedebug
&&
!
wcsncmp
(
ptr
,
WINEDEBUG
,
ARRAY_SIZE
(
WINEDEBUG
)
-
1
))
if
(
!*
winedebug
&&
!
wcsncmp
(
ptr
,
WINEDEBUG
,
ARRAY_SIZE
(
WINEDEBUG
)
-
1
))
{
{
DWORD
len
=
wcslen
(
ptr
)
*
3
+
1
;
DWORD
len
=
wcslen
(
ptr
)
*
3
+
1
;
if
((
*
winedebug
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
len
)))
if
((
*
winedebug
=
malloc
(
len
)))
ntdll_wcstoumbs
(
ptr
,
wcslen
(
ptr
)
+
1
,
*
winedebug
,
len
,
FALSE
);
ntdll_wcstoumbs
(
ptr
,
wcslen
(
ptr
)
+
1
,
*
winedebug
,
len
,
FALSE
);
}
}
ptr
+=
wcslen
(
ptr
)
+
1
;
ptr
+=
wcslen
(
ptr
)
+
1
;
...
@@ -991,8 +991,8 @@ done:
...
@@ -991,8 +991,8 @@ done:
if
(
thread_handle
)
NtClose
(
thread_handle
);
if
(
thread_handle
)
NtClose
(
thread_handle
);
if
(
socketfd
[
0
]
!=
-
1
)
close
(
socketfd
[
0
]
);
if
(
socketfd
[
0
]
!=
-
1
)
close
(
socketfd
[
0
]
);
if
(
unixdir
!=
-
1
)
close
(
unixdir
);
if
(
unixdir
!=
-
1
)
close
(
unixdir
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
startup_info
);
free
(
startup_info
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
winedebug
);
free
(
winedebug
);
return
status
;
return
status
;
}
}
...
...
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