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
d10ca9ce
Commit
d10ca9ce
authored
Sep 04, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed GMEM_ZEROINIT in GlobalRealloc (thanks to Gerard Patel).
parent
04699cca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
global.c
memory/global.c
+4
-3
No files found.
memory/global.c
View file @
d10ca9ce
...
...
@@ -1175,6 +1175,7 @@ HGLOBAL WINAPI GlobalReAlloc(
HGLOBAL
hnew
;
PGLOBAL32_INTERN
pintern
;
HANDLE
heap
=
GLOBAL_GetHeap
(
hmem
);
DWORD
heap_flags
=
(
flags
&
GMEM_ZEROINIT
)
?
HEAP_ZERO_MEMORY
:
0
;
hnew
=
0
;
/* HeapLock(heap); */
...
...
@@ -1216,7 +1217,7 @@ HGLOBAL WINAPI GlobalReAlloc(
if
(
ISPOINTER
(
hmem
))
{
/* reallocate fixed memory */
hnew
=
(
HGLOBAL
)
HeapReAlloc
(
heap
,
0
,
(
LPVOID
)
hmem
,
size
);
hnew
=
(
HGLOBAL
)
HeapReAlloc
(
heap
,
heap_flags
,
(
LPVOID
)
hmem
,
size
);
}
else
{
...
...
@@ -1230,14 +1231,14 @@ HGLOBAL WINAPI GlobalReAlloc(
hnew
=
hmem
;
if
(
pintern
->
Pointer
)
{
palloc
=
HeapReAlloc
(
heap
,
0
,
palloc
=
HeapReAlloc
(
heap
,
heap_flags
,
(
char
*
)
pintern
->
Pointer
-
sizeof
(
HGLOBAL
),
size
+
sizeof
(
HGLOBAL
)
);
pintern
->
Pointer
=
(
char
*
)
palloc
+
sizeof
(
HGLOBAL
);
}
else
{
palloc
=
HeapAlloc
(
heap
,
0
,
size
+
sizeof
(
HGLOBAL
));
palloc
=
HeapAlloc
(
heap
,
heap_flags
,
size
+
sizeof
(
HGLOBAL
));
*
(
HGLOBAL
*
)
palloc
=
hmem
;
pintern
->
Pointer
=
(
char
*
)
palloc
+
sizeof
(
HGLOBAL
);
}
...
...
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