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
0b09db59
Commit
0b09db59
authored
Nov 13, 2022
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Fix memory leak on error path in EDIT_MakeUndoFit.
parent
faae2144
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
edit.c
dlls/comctl32/edit.c
+3
-1
No files found.
dlls/comctl32/edit.c
View file @
0b09db59
...
...
@@ -1292,6 +1292,7 @@ static BOOL EDIT_MakeFit(EDITSTATE *es, UINT size)
static
BOOL
EDIT_MakeUndoFit
(
EDITSTATE
*
es
,
UINT
size
)
{
UINT
alloc_size
;
WCHAR
*
new_undo_text
;
if
(
size
<=
es
->
undo_buffer_size
)
return
TRUE
;
...
...
@@ -1299,7 +1300,8 @@ static BOOL EDIT_MakeUndoFit(EDITSTATE *es, UINT size)
TRACE
(
"trying to ReAlloc to %d+1
\n
"
,
size
);
alloc_size
=
ROUND_TO_GROW
((
size
+
1
)
*
sizeof
(
WCHAR
));
if
((
es
->
undo_text
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
es
->
undo_text
,
alloc_size
)))
{
if
((
new_undo_text
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
es
->
undo_text
,
alloc_size
)))
{
es
->
undo_text
=
new_undo_text
;
es
->
undo_buffer_size
=
alloc_size
/
sizeof
(
WCHAR
)
-
1
;
return
TRUE
;
}
...
...
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