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
d7218138
Commit
d7218138
authored
Mar 17, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Mar 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: pFmt isn't exposed to the client, so simplify its allocation.
parent
8beb8386
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
clipboard.c
dlls/ole32/clipboard.c
+7
-15
No files found.
dlls/ole32/clipboard.c
View file @
d7218138
...
...
@@ -231,7 +231,6 @@ static ULONG WINAPI OLEClipbrd_IEnumFORMATETC_AddRef(LPENUMFORMATETC iface)
static
ULONG
WINAPI
OLEClipbrd_IEnumFORMATETC_Release
(
LPENUMFORMATETC
iface
)
{
IEnumFORMATETCImpl
*
This
=
(
IEnumFORMATETCImpl
*
)
iface
;
LPMALLOC
pIMalloc
;
ULONG
ref
;
TRACE
(
"(%p)->(count=%u)
\n
"
,
This
,
This
->
ref
);
...
...
@@ -243,12 +242,7 @@ static ULONG WINAPI OLEClipbrd_IEnumFORMATETC_Release(LPENUMFORMATETC iface)
if
(
!
ref
)
{
TRACE
(
"() - destroying IEnumFORMATETC(%p)
\n
"
,
This
);
if
(
SUCCEEDED
(
CoGetMalloc
(
MEMCTX_TASK
,
&
pIMalloc
)))
{
IMalloc_Free
(
pIMalloc
,
This
->
pFmt
);
IMalloc_Release
(
pIMalloc
);
}
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pFmt
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
...
...
@@ -379,9 +373,8 @@ static LPENUMFORMATETC OLEClipbrd_IEnumFORMATETC_Construct(UINT cfmt, const FORM
{
IEnumFORMATETCImpl
*
ef
;
DWORD
size
=
cfmt
*
sizeof
(
FORMATETC
);
LPMALLOC
pIMalloc
;
ef
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IEnumFORMATETCImpl
));
ef
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IEnumFORMATETCImpl
));
if
(
!
ef
)
return
NULL
;
...
...
@@ -391,15 +384,14 @@ static LPENUMFORMATETC OLEClipbrd_IEnumFORMATETC_Construct(UINT cfmt, const FORM
ef
->
posFmt
=
0
;
ef
->
countFmt
=
cfmt
;
if
(
FAILED
(
CoGetMalloc
(
MEMCTX_TASK
,
&
pIMalloc
)))
{
ef
->
pFmt
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
ef
->
pFmt
)
memcpy
(
ef
->
pFmt
,
afmt
,
size
);
else
{
HeapFree
(
GetProcessHeap
(),
0
,
ef
);
return
NULL
;
}
ef
->
pFmt
=
IMalloc_Alloc
(
pIMalloc
,
size
);
IMalloc_Release
(
pIMalloc
);
if
(
ef
->
pFmt
)
memcpy
(
ef
->
pFmt
,
afmt
,
size
);
TRACE
(
"(%p)->()
\n
"
,
ef
);
return
(
LPENUMFORMATETC
)
ef
;
...
...
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