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
20bc32cd
Commit
20bc32cd
authored
Jul 14, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use malloc() to allocate temporary system information.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
242dc898
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
system.c
dlls/ntdll/unix/system.c
+5
-6
No files found.
dlls/ntdll/unix/system.c
View file @
20bc32cd
...
...
@@ -2073,7 +2073,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
char
*
buffer
=
NULL
;
unsigned
int
pos
=
0
;
if
(
size
&&
!
(
buffer
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
size
)))
if
(
size
&&
!
(
buffer
=
malloc
(
size
)))
{
ret
=
STATUS_NO_MEMORY
;
break
;
...
...
@@ -2090,7 +2090,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
if
(
ret
)
{
RtlFreeHeap
(
GetProcessHeap
(),
0
,
buffer
);
free
(
buffer
);
break
;
}
...
...
@@ -2166,7 +2166,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
}
if
(
len
>
size
)
ret
=
STATUS_INFO_LENGTH_MISMATCH
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
buffer
);
free
(
buffer
);
break
;
}
...
...
@@ -2327,8 +2327,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
}
num_handles
=
(
size
-
FIELD_OFFSET
(
SYSTEM_HANDLE_INFORMATION
,
Handle
))
/
sizeof
(
SYSTEM_HANDLE_ENTRY
);
if
(
!
(
handle_info
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
(
*
handle_info
)
*
num_handles
)))
return
STATUS_NO_MEMORY
;
if
(
!
(
handle_info
=
malloc
(
sizeof
(
*
handle_info
)
*
num_handles
)))
return
STATUS_NO_MEMORY
;
SERVER_START_REQ
(
get_system_handles
)
{
...
...
@@ -2355,7 +2354,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
}
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
handle_info
);
free
(
handle_info
);
break
;
}
...
...
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