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
aa203f09
Commit
aa203f09
authored
Oct 24, 2006
by
Rob Shearman
Committed by
Alexandre Julliard
Oct 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Free the array subscript memory for type descriptions when freeing the typelib.
parent
2b65782d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
typelib.c
dlls/oleaut32/typelib.c
+7
-1
No files found.
dlls/oleaut32/typelib.c
View file @
aa203f09
...
@@ -900,6 +900,7 @@ typedef struct tagITypeLibImpl
...
@@ -900,6 +900,7 @@ typedef struct tagITypeLibImpl
int
ctCustData
;
/* number of items in cust data list */
int
ctCustData
;
/* number of items in cust data list */
TLBCustData
*
pCustData
;
/* linked list to cust data */
TLBCustData
*
pCustData
;
/* linked list to cust data */
TLBImpLib
*
pImpLibs
;
/* linked list to all imported typelibs */
TLBImpLib
*
pImpLibs
;
/* linked list to all imported typelibs */
int
ctTypeDesc
;
/* number of items in type desc array */
TYPEDESC
*
pTypeDesc
;
/* array of TypeDescriptions found in the
TYPEDESC
*
pTypeDesc
;
/* array of TypeDescriptions found in the
libary. Only used while read MSFT
libary. Only used while read MSFT
typelibs */
typelibs */
...
@@ -2451,6 +2452,7 @@ static ITypeLib2* ITypeLib2_Constructor_MSFT(LPVOID pLib, DWORD dwTLBLength)
...
@@ -2451,6 +2452,7 @@ static ITypeLib2* ITypeLib2_Constructor_MSFT(LPVOID pLib, DWORD dwTLBLength)
{
{
int
i
,
j
,
cTD
=
tlbSegDir
.
pTypdescTab
.
length
/
(
2
*
sizeof
(
INT
));
int
i
,
j
,
cTD
=
tlbSegDir
.
pTypdescTab
.
length
/
(
2
*
sizeof
(
INT
));
INT16
td
[
4
];
INT16
td
[
4
];
pTypeLibImpl
->
ctTypeDesc
=
cTD
;
pTypeLibImpl
->
pTypeDesc
=
TLB_Alloc
(
cTD
*
sizeof
(
TYPEDESC
));
pTypeLibImpl
->
pTypeDesc
=
TLB_Alloc
(
cTD
*
sizeof
(
TYPEDESC
));
MSFT_ReadLEWords
(
td
,
sizeof
(
td
),
&
cx
,
tlbSegDir
.
pTypdescTab
.
offset
);
MSFT_ReadLEWords
(
td
,
sizeof
(
td
),
&
cx
,
tlbSegDir
.
pTypdescTab
.
offset
);
for
(
i
=
0
;
i
<
cTD
;
)
for
(
i
=
0
;
i
<
cTD
;
)
...
@@ -3542,6 +3544,7 @@ static ULONG WINAPI ITypeLib2_fnRelease( ITypeLib2 *iface)
...
@@ -3542,6 +3544,7 @@ static ULONG WINAPI ITypeLib2_fnRelease( ITypeLib2 *iface)
{
{
TLBImpLib
*
pImpLib
,
*
pImpLibNext
;
TLBImpLib
*
pImpLib
,
*
pImpLibNext
;
TLBCustData
*
pCustData
,
*
pCustDataNext
;
TLBCustData
*
pCustData
,
*
pCustDataNext
;
int
i
;
/* remove cache entry */
/* remove cache entry */
if
(
This
->
path
)
if
(
This
->
path
)
...
@@ -3588,7 +3591,10 @@ static ULONG WINAPI ITypeLib2_fnRelease( ITypeLib2 *iface)
...
@@ -3588,7 +3591,10 @@ static ULONG WINAPI ITypeLib2_fnRelease( ITypeLib2 *iface)
TLB_Free
(
pCustData
);
TLB_Free
(
pCustData
);
}
}
/* FIXME: free arrays inside elements of This->pTypeDesc */
for
(
i
=
0
;
i
<
This
->
ctTypeDesc
;
i
++
)
if
(
This
->
pTypeDesc
[
i
].
vt
==
VT_CARRAY
)
TLB_Free
(
This
->
pTypeDesc
[
i
].
u
.
lpadesc
);
TLB_Free
(
This
->
pTypeDesc
);
TLB_Free
(
This
->
pTypeDesc
);
for
(
pImpLib
=
This
->
pImpLibs
;
pImpLib
;
pImpLib
=
pImpLibNext
)
for
(
pImpLib
=
This
->
pImpLibs
;
pImpLib
;
pImpLib
=
pImpLibNext
)
...
...
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