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
55ffe637
Commit
55ffe637
authored
Dec 01, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Dec 01, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The pparamdescex of an ELEMDESC should only be copied if wParamFlags &
PARAMFLAG_DHASDEFAULT. Make ITypeInfo_ReleaseVarDesc use TLB_FreeElemDesc.
parent
4653468c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
typelib.c
dlls/oleaut32/typelib.c
+7
-7
No files found.
dlls/oleaut32/typelib.c
View file @
55ffe637
...
@@ -4333,7 +4333,7 @@ static ULONG WINAPI ITypeInfo_fnRelease(ITypeInfo2 *iface)
...
@@ -4333,7 +4333,7 @@ static ULONG WINAPI ITypeInfo_fnRelease(ITypeInfo2 *iface)
static
HRESULT
WINAPI
ITypeInfo_fnGetTypeAttr
(
ITypeInfo2
*
iface
,
static
HRESULT
WINAPI
ITypeInfo_fnGetTypeAttr
(
ITypeInfo2
*
iface
,
LPTYPEATTR
*
ppTypeAttr
)
LPTYPEATTR
*
ppTypeAttr
)
{
{
ITypeInfoImpl
*
This
=
(
ITypeInfoImpl
*
)
iface
;
const
ITypeInfoImpl
*
This
=
(
ITypeInfoImpl
*
)
iface
;
SIZE_T
size
;
SIZE_T
size
;
TRACE
(
"(%p)
\n
"
,
This
);
TRACE
(
"(%p)
\n
"
,
This
);
...
@@ -4382,7 +4382,7 @@ static HRESULT WINAPI ITypeInfo_fnGetTypeComp( ITypeInfo2 *iface,
...
@@ -4382,7 +4382,7 @@ static HRESULT WINAPI ITypeInfo_fnGetTypeComp( ITypeInfo2 *iface,
static
SIZE_T
TLB_SizeElemDesc
(
const
ELEMDESC
*
elemdesc
)
static
SIZE_T
TLB_SizeElemDesc
(
const
ELEMDESC
*
elemdesc
)
{
{
SIZE_T
size
=
TLB_SizeTypeDesc
(
&
elemdesc
->
tdesc
,
FALSE
);
SIZE_T
size
=
TLB_SizeTypeDesc
(
&
elemdesc
->
tdesc
,
FALSE
);
if
(
elemdesc
->
u
.
paramdesc
.
pparamdescex
)
if
(
elemdesc
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FHASDEFAULT
)
size
+=
sizeof
(
*
elemdesc
->
u
.
paramdesc
.
pparamdescex
);
size
+=
sizeof
(
*
elemdesc
->
u
.
paramdesc
.
pparamdescex
);
return
size
;
return
size
;
}
}
...
@@ -4391,23 +4391,24 @@ static HRESULT TLB_CopyElemDesc( const ELEMDESC *src, ELEMDESC *dest, char **buf
...
@@ -4391,23 +4391,24 @@ static HRESULT TLB_CopyElemDesc( const ELEMDESC *src, ELEMDESC *dest, char **buf
{
{
memcpy
(
dest
,
src
,
sizeof
(
ELEMDESC
));
memcpy
(
dest
,
src
,
sizeof
(
ELEMDESC
));
*
buffer
=
TLB_CopyTypeDesc
(
&
dest
->
tdesc
,
&
src
->
tdesc
,
*
buffer
);
*
buffer
=
TLB_CopyTypeDesc
(
&
dest
->
tdesc
,
&
src
->
tdesc
,
*
buffer
);
if
(
src
->
u
.
paramdesc
.
pparamdescex
)
if
(
src
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FHASDEFAULT
)
{
{
const
PARAMDESCEX
*
pparamdescex_src
=
src
->
u
.
paramdesc
.
pparamdescex
;
const
PARAMDESCEX
*
pparamdescex_src
=
src
->
u
.
paramdesc
.
pparamdescex
;
PARAMDESCEX
*
pparamdescex_dest
=
dest
->
u
.
paramdesc
.
pparamdescex
=
(
PARAMDESCEX
*
)
*
buffer
;
PARAMDESCEX
*
pparamdescex_dest
=
dest
->
u
.
paramdesc
.
pparamdescex
=
(
PARAMDESCEX
*
)
*
buffer
;
*
buffer
+=
sizeof
(
PARAMDESCEX
);
*
buffer
+=
sizeof
(
PARAMDESCEX
);
memcpy
(
pparamdescex_dest
,
pparamdescex_src
,
sizeof
(
PARAMDESCEX
));
memcpy
(
pparamdescex_dest
,
pparamdescex_src
,
sizeof
(
PARAMDESCEX
));
VariantInit
(
&
pparamdescex_dest
->
varDefaultValue
);
VariantInit
(
&
pparamdescex_dest
->
varDefaultValue
);
if
(
src
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FHASDEFAULT
)
return
VariantCopy
(
&
pparamdescex_dest
->
varDefaultValue
,
return
VariantCopy
(
&
pparamdescex_dest
->
varDefaultValue
,
(
VARIANTARG
*
)
&
pparamdescex_src
->
varDefaultValue
);
(
VARIANTARG
*
)
&
pparamdescex_src
->
varDefaultValue
);
}
}
else
dest
->
u
.
paramdesc
.
pparamdescex
=
NULL
;
return
S_OK
;
return
S_OK
;
}
}
static
void
TLB_FreeElemDesc
(
ELEMDESC
*
elemdesc
)
static
void
TLB_FreeElemDesc
(
ELEMDESC
*
elemdesc
)
{
{
if
(
elemdesc
->
u
.
paramdesc
.
pparamdescex
)
if
(
elemdesc
->
u
.
paramdesc
.
wParamFlags
&
PARAMFLAG_FHASDEFAULT
)
VariantClear
(
&
elemdesc
->
u
.
paramdesc
.
pparamdescex
->
varDefaultValue
);
VariantClear
(
&
elemdesc
->
u
.
paramdesc
.
pparamdescex
->
varDefaultValue
);
}
}
...
@@ -5717,8 +5718,7 @@ static void WINAPI ITypeInfo_fnReleaseVarDesc( ITypeInfo2 *iface,
...
@@ -5717,8 +5718,7 @@ static void WINAPI ITypeInfo_fnReleaseVarDesc( ITypeInfo2 *iface,
ITypeInfoImpl
*
This
=
(
ITypeInfoImpl
*
)
iface
;
ITypeInfoImpl
*
This
=
(
ITypeInfoImpl
*
)
iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pVarDesc
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pVarDesc
);
if
(
pVarDesc
->
elemdescVar
.
u
.
paramdesc
.
pparamdescex
)
TLB_FreeElemDesc
(
&
pVarDesc
->
elemdescVar
);
VariantClear
(
&
pVarDesc
->
elemdescVar
.
u
.
paramdesc
.
pparamdescex
->
varDefaultValue
);
if
(
pVarDesc
->
varkind
==
VAR_CONST
)
if
(
pVarDesc
->
varkind
==
VAR_CONST
)
VariantClear
(
pVarDesc
->
u
.
lpvarValue
);
VariantClear
(
pVarDesc
->
u
.
lpvarValue
);
SysFreeString
((
BSTR
)
pVarDesc
);
SysFreeString
((
BSTR
)
pVarDesc
);
...
...
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