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
2e4b637f
Commit
2e4b637f
authored
Apr 30, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
May 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Consistently use a heap local variable.
Instead of subheap->heap. Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
parent
c39dbe1f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
heap.c
dlls/ntdll/heap.c
+6
-5
No files found.
dlls/ntdll/heap.c
View file @
2e4b637f
...
...
@@ -1393,6 +1393,7 @@ HANDLE WINAPI RtlCreateHeap( ULONG flags, PVOID addr, SIZE_T totalSize, SIZE_T c
PVOID
unknown
,
PRTL_HEAP_DEFINITION
definition
)
{
SUBHEAP
*
subheap
;
HEAP
*
heap
;
/* Allocate the heap block */
...
...
@@ -1402,24 +1403,24 @@ HANDLE WINAPI RtlCreateHeap( ULONG flags, PVOID addr, SIZE_T totalSize, SIZE_T c
if
(
!
totalSize
)
totalSize
=
HEAP_DEF_SIZE
;
if
(
!
(
subheap
=
HEAP_CreateSubHeap
(
NULL
,
addr
,
flags
,
commitSize
,
totalSize
)))
return
0
;
heap
=
subheap
->
heap
;
heap_set_debug_flags
(
subheap
->
heap
);
heap_set_debug_flags
(
heap
);
/* link it into the per-process heap list */
if
(
processHeap
)
{
HEAP
*
heapPtr
=
subheap
->
heap
;
RtlEnterCriticalSection
(
&
processHeap
->
cs
);
list_add_head
(
&
processHeap
->
entry
,
&
heap
Ptr
->
entry
);
list_add_head
(
&
processHeap
->
entry
,
&
heap
->
entry
);
RtlLeaveCriticalSection
(
&
processHeap
->
cs
);
}
else
if
(
!
addr
)
{
processHeap
=
subheap
->
heap
;
/* assume the first heap we create is the process main heap */
processHeap
=
heap
;
/* assume the first heap we create is the process main heap */
list_init
(
&
processHeap
->
entry
);
}
return
subheap
->
heap
;
return
heap
;
}
...
...
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