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
e72ed1c4
Commit
e72ed1c4
authored
Oct 20, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/edit: Properly clean up on failure inside WM_NCCREATE handler.
parent
a6096606
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
edit.c
dlls/user32/edit.c
+11
-3
No files found.
dlls/user32/edit.c
View file @
e72ed1c4
...
...
@@ -4599,16 +4599,16 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs, BOOL unicode)
alloc_size
=
ROUND_TO_GROW
((
es
->
buffer_size
+
1
)
*
sizeof
(
WCHAR
));
if
(
!
(
es
->
hloc32W
=
LocalAlloc
(
LMEM_MOVEABLE
|
LMEM_ZEROINIT
,
alloc_size
)))
return
FALSE
;
goto
cleanup
;
es
->
buffer_size
=
LocalSize
(
es
->
hloc32W
)
/
sizeof
(
WCHAR
)
-
1
;
if
(
!
(
es
->
undo_text
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
(
es
->
buffer_size
+
1
)
*
sizeof
(
WCHAR
))))
return
FALSE
;
goto
cleanup
;
es
->
undo_buffer_size
=
es
->
buffer_size
;
if
(
es
->
style
&
ES_MULTILINE
)
if
(
!
(
es
->
first_line_def
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
LINEDEF
))))
return
FALSE
;
goto
cleanup
;
es
->
line_count
=
1
;
/*
...
...
@@ -4628,6 +4628,14 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs, BOOL unicode)
SetWindowLongW
(
hwnd
,
GWL_STYLE
,
es
->
style
&
~
WS_BORDER
);
return
TRUE
;
cleanup:
SetWindowLongPtrW
(
es
->
hwndSelf
,
0
,
0
);
HeapFree
(
GetProcessHeap
(),
0
,
es
->
first_line_def
);
HeapFree
(
GetProcessHeap
(),
0
,
es
->
undo_text
);
if
(
es
->
hloc32W
)
LocalFree
(
es
->
hloc32W
);
HeapFree
(
GetProcessHeap
(),
0
,
es
);
return
FALSE
;
}
...
...
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