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
e971e0fb
Commit
e971e0fb
authored
Oct 24, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Oct 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Make sure to use GlobalAlloc with GlobalFree.
parent
615d09f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
clipboard.c
dlls/riched20/clipboard.c
+3
-3
No files found.
dlls/riched20/clipboard.c
View file @
e971e0fb
...
...
@@ -76,7 +76,7 @@ static ULONG WINAPI EnumFormatImpl_Release(IEnumFORMATETC *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
fmtetc
);
GlobalFree
(
This
->
fmtetc
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -157,7 +157,7 @@ static HRESULT EnumFormatImpl_Create(FORMATETC *fmtetc, UINT fmtetc_cnt, IEnumFO
ret
->
ref
=
1
;
ret
->
cur
=
0
;
ret
->
fmtetc_cnt
=
fmtetc_cnt
;
ret
->
fmtetc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
fmtetc_cnt
*
sizeof
(
FORMATETC
));
ret
->
fmtetc
=
GlobalAlloc
(
GMEM_ZEROINIT
,
fmtetc_cnt
*
sizeof
(
FORMATETC
));
memcpy
(
ret
->
fmtetc
,
fmtetc
,
fmtetc_cnt
*
sizeof
(
FORMATETC
));
*
lplpformatetc
=
(
LPENUMFORMATETC
)
ret
;
return
S_OK
;
...
...
@@ -400,7 +400,7 @@ HRESULT ME_GetDataObject(ME_TextEditor *editor, CHARRANGE *lpchrg, LPDATAOBJECT
obj
->
fmtetc_cnt
=
1
;
if
(
editor
->
mode
&
TM_RICHTEXT
)
obj
->
fmtetc_cnt
++
;
obj
->
fmtetc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
obj
->
fmtetc_cnt
*
sizeof
(
FORMATETC
));
obj
->
fmtetc
=
GlobalAlloc
(
GMEM_ZEROINIT
,
obj
->
fmtetc_cnt
*
sizeof
(
FORMATETC
));
InitFormatEtc
(
obj
->
fmtetc
[
0
],
CF_UNICODETEXT
,
TYMED_HGLOBAL
);
if
(
editor
->
mode
&
TM_RICHTEXT
)
{
obj
->
rtf
=
get_rtf_text
(
editor
,
lpchrg
);
...
...
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