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
1dcf3f7a
Commit
1dcf3f7a
authored
Feb 01, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/tests: Fix a safearray leak (Valgrind).
parent
a0e7c999
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
safearray.c
dlls/oleaut32/tests/safearray.c
+11
-2
variant.c
dlls/oleaut32/variant.c
+1
-2
No files found.
dlls/oleaut32/tests/safearray.c
View file @
1dcf3f7a
...
...
@@ -1683,9 +1683,18 @@ static void test_SafeArrayChangeTypeEx(void)
VariantInit
(
&
v2
);
hres
=
VariantChangeTypeEx
(
&
v2
,
&
v
,
0
,
0
,
VT_BSTR
);
ok
(
hres
!=
S_OK
,
"CTE VT_ARRAY|VT %d->BSTR succeeded
\n
"
,
vt
);
if
(
vt
==
VT_INT_PTR
||
vt
==
VT_UINT_PTR
)
{
ok
(
hres
==
DISP_E_BADVARTYPE
,
"expected DISP_E_BADVARTYPE, got 0x%08x
\n
"
,
hres
);
SafeArrayDestroy
(
sa
);
}
else
{
ok
(
hres
==
DISP_E_TYPEMISMATCH
,
"got 0x%08x for vt=%d, instead of DISP_E_TYPEMISMATCH
\n
"
,
hres
,
vt
);
hres
=
VariantClear
(
&
v
);
ok
(
hres
==
S_OK
,
"expected S_OK, got 0x%08x
\n
"
,
hres
);
}
VariantClear
(
&
v2
);
VariantClear
(
&
v
);
}
/* Can't change an array of one type into array of another type , even
...
...
dlls/oleaut32/variant.c
View file @
1dcf3f7a
...
...
@@ -652,7 +652,7 @@ HRESULT VARIANT_ClearInd(VARIANTARG *pVarg)
*/
HRESULT
WINAPI
VariantClear
(
VARIANTARG
*
pVarg
)
{
HRESULT
hres
=
S_OK
;
HRESULT
hres
;
TRACE
(
"(%p->(%s%s))
\n
"
,
pVarg
,
debugstr_VT
(
pVarg
),
debugstr_VF
(
pVarg
));
...
...
@@ -664,7 +664,6 @@ HRESULT WINAPI VariantClear(VARIANTARG* pVarg)
{
if
(
V_ISARRAY
(
pVarg
)
||
V_VT
(
pVarg
)
==
VT_SAFEARRAY
)
{
if
(
V_ARRAY
(
pVarg
))
hres
=
SafeArrayDestroy
(
V_ARRAY
(
pVarg
));
}
else
if
(
V_VT
(
pVarg
)
==
VT_BSTR
)
...
...
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