Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
fc47be57
Commit
fc47be57
authored
Apr 05, 2003
by
Alberto Massari
Committed by
Alexandre Julliard
Apr 05, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- The bindcontext object was leaking strings.
- Removed unused variable.
parent
686e7d75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
bindctx.c
dlls/ole32/bindctx.c
+17
-10
No files found.
dlls/ole32/bindctx.c
View file @
fc47be57
...
...
@@ -223,10 +223,8 @@ HRESULT WINAPI BindCtxImpl_Destroy(BindCtxImpl* This)
******************************************************************************/
HRESULT
WINAPI
BindCtxImpl_RegisterObjectBound
(
IBindCtx
*
iface
,
IUnknown
*
punk
)
{
ICOM_THIS
(
BindCtxImpl
,
iface
);
DWORD
lastIndex
=
This
->
bindCtxTableLastIndex
;
BindCtxObject
cell
;
TRACE
(
"(%p,%p)
\n
"
,
This
,
punk
);
...
...
@@ -239,7 +237,6 @@ HRESULT WINAPI BindCtxImpl_RegisterObjectBound(IBindCtx* iface,IUnknown* punk)
This
->
bindCtxTable
[
lastIndex
].
pObj
=
punk
;
This
->
bindCtxTable
[
lastIndex
].
pkeyObj
=
NULL
;
This
->
bindCtxTable
[
lastIndex
].
regType
=
0
;
cell
=
This
->
bindCtxTable
[
lastIndex
];
lastIndex
=
++
This
->
bindCtxTableLastIndex
;
if
(
lastIndex
==
This
->
bindCtxTableSize
){
/* the table is full so it must be resized */
...
...
@@ -272,11 +269,13 @@ HRESULT WINAPI BindCtxImpl_RevokeObjectBound(IBindCtx* iface, IUnknown* punk)
/* check if the object was registred or not */
if
(
BindCtxImpl_GetObjectIndex
(
This
,
punk
,
NULL
,
&
index
)
==
S_FALSE
)
return
MK_E_NOTBOUND
;
IUnknown_Release
(
This
->
bindCtxTable
[
index
].
pObj
);
if
(
This
->
bindCtxTable
[
index
].
pObj
)
IUnknown_Release
(
This
->
bindCtxTable
[
index
].
pObj
);
if
(
This
->
bindCtxTable
[
index
].
pkeyObj
)
HeapFree
(
GetProcessHeap
(),
0
,
This
->
bindCtxTable
[
index
].
pkeyObj
);
/* left-shift all elements in the right side of the current revoked object */
for
(
j
=
index
;
j
<
This
->
bindCtxTableLastIndex
-
1
;
j
++
)
This
->
bindCtxTable
[
j
]
=
This
->
bindCtxTable
[
j
+
1
];
...
...
@@ -298,8 +297,13 @@ HRESULT WINAPI BindCtxImpl_ReleaseBoundObjects(IBindCtx* iface)
TRACE
(
"(%p)
\n
"
,
This
);
for
(
i
=
0
;
i
<
This
->
bindCtxTableLastIndex
;
i
++
)
IUnknown_Release
(
This
->
bindCtxTable
[
i
].
pObj
);
{
if
(
This
->
bindCtxTable
[
i
].
pObj
)
IUnknown_Release
(
This
->
bindCtxTable
[
i
].
pObj
);
if
(
This
->
bindCtxTable
[
i
].
pkeyObj
)
HeapFree
(
GetProcessHeap
(),
0
,
This
->
bindCtxTable
[
i
].
pkeyObj
);
}
This
->
bindCtxTableLastIndex
=
0
;
return
S_OK
;
...
...
@@ -463,8 +467,11 @@ HRESULT WINAPI BindCtxImpl_RevokeObjectParam(IBindCtx* iface,LPOLESTR ppenum)
return
E_FAIL
;
/* release the object if it's found */
IUnknown_Release
(
This
->
bindCtxTable
[
index
].
pObj
);
if
(
This
->
bindCtxTable
[
index
].
pObj
)
IUnknown_Release
(
This
->
bindCtxTable
[
index
].
pObj
);
if
(
This
->
bindCtxTable
[
index
].
pkeyObj
)
HeapFree
(
GetProcessHeap
(),
0
,
This
->
bindCtxTable
[
index
].
pkeyObj
);
/* remove the object from the table with a left-shifting of all objects in the right side */
for
(
j
=
index
;
j
<
This
->
bindCtxTableLastIndex
-
1
;
j
++
)
This
->
bindCtxTable
[
j
]
=
This
->
bindCtxTable
[
j
+
1
];
...
...
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