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
8c3ed829
Commit
8c3ed829
authored
Jun 22, 2017
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 22, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user.exe16: Fix memory leak in case when HeapReAlloc fails.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f7fd2c2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
user.c
dlls/user.exe16/user.c
+4
-1
No files found.
dlls/user.exe16/user.c
View file @
8c3ed829
...
...
@@ -3245,8 +3245,11 @@ DWORD WINAPI FormatMessage16(
/* CMF - This makes a BIG assumption about va_list */
while
((
ret
=
vsnprintf
(
b
,
sz
,
fmtstr
,
(
va_list
)
argliststart
))
<
0
||
ret
>=
sz
)
{
LPSTR
new_b
;
sz
=
(
ret
==
-
1
?
sz
+
100
:
ret
+
1
);
b
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
b
,
sz
);
new_b
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
b
,
sz
);
if
(
!
new_b
)
break
;
b
=
new_b
;
}
for
(
x
=
b
;
*
x
;
x
++
)
ADD_TO_T
(
*
x
);
HeapFree
(
GetProcessHeap
(),
0
,
b
);
...
...
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