Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
e6837104
Commit
e6837104
authored
Nov 27, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Nov 28, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Introduce a new helper function, TLB_FreeCustData, for freeing custom data.
Fix memory leaks caused by the variable and interface custom data not being freed properly.
parent
aaa6c400
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
typelib.c
dlls/oleaut32/typelib.c
+17
-16
No files found.
dlls/oleaut32/typelib.c
View file @
e6837104
...
...
@@ -1421,6 +1421,19 @@ static void *TLB_CopyTypeDesc( TYPEDESC *dest, const TYPEDESC *src, void *buffer
return
buffer
;
}
/* free custom data allocated by MSFT_CustData */
static
inline
void
TLB_FreeCustData
(
TLBCustData
*
pCustData
)
{
TLBCustData
*
pCustDataNext
;
for
(;
pCustData
;
pCustData
=
pCustDataNext
)
{
VariantClear
(
&
pCustData
->
data
);
pCustDataNext
=
pCustData
->
next
;
TLB_Free
(
pCustData
);
}
}
/**********************************************************************
*
* Functions for reading MSFT typelibs (those created by CreateTypeLib2)
...
...
@@ -4474,7 +4487,6 @@ static ULONG WINAPI ITypeInfo_fnRelease(ITypeInfo2 *iface)
TLBFuncDesc
*
pFInfo
,
*
pFInfoNext
;
TLBVarDesc
*
pVInfo
,
*
pVInfoNext
;
TLBImplType
*
pImpl
,
*
pImplNext
;
TLBCustData
*
pCustData
,
*
pCustDataNext
;
TRACE
(
"destroying ITypeInfo(%p)
\n
"
,
This
);
...
...
@@ -4514,13 +4526,7 @@ static ULONG WINAPI ITypeInfo_fnRelease(ITypeInfo2 *iface)
}
TLB_Free
(
pFInfo
->
funcdesc
.
lprgelemdescParam
);
TLB_Free
(
pFInfo
->
pParamDesc
);
for
(
pCustData
=
pFInfo
->
pCustData
;
pCustData
;
pCustData
=
pCustDataNext
)
{
VariantClear
(
&
pCustData
->
data
);
pCustDataNext
=
pCustData
->
next
;
TLB_Free
(
pCustData
);
}
TLB_FreeCustData
(
pFInfo
->
pCustData
);
if
(
HIWORD
(
pFInfo
->
Entry
)
!=
0
&&
pFInfo
->
Entry
!=
(
BSTR
)
-
1
)
SysFreeString
(
pFInfo
->
Entry
);
SysFreeString
(
pFInfo
->
HelpString
);
...
...
@@ -4536,23 +4542,18 @@ static ULONG WINAPI ITypeInfo_fnRelease(ITypeInfo2 *iface)
VariantClear
(
pVInfo
->
vardesc
.
u
.
lpvarValue
);
TLB_Free
(
pVInfo
->
vardesc
.
u
.
lpvarValue
);
}
TLB_FreeCustData
(
pVInfo
->
pCustData
);
SysFreeString
(
pVInfo
->
Name
);
pVInfoNext
=
pVInfo
->
next
;
TLB_Free
(
pVInfo
);
}
for
(
pImpl
=
This
->
impltypelist
;
pImpl
;
pImpl
=
pImplNext
)
{
for
(
pCustData
=
pImpl
->
pCustData
;
pCustData
;
pCustData
=
pCustDataNext
)
{
VariantClear
(
&
pCustData
->
data
);
pCustDataNext
=
pCustData
->
next
;
TLB_Free
(
pCustData
);
}
TLB_FreeCustData
(
pImpl
->
pCustData
);
pImplNext
=
pImpl
->
next
;
TLB_Free
(
pImpl
);
}
TLB_Free
(
This
->
pCustData
);
TLB_Free
CustData
(
This
->
pCustData
);
finish_free:
if
(
This
->
next
)
...
...
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