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
0099431f
Commit
0099431f
authored
Dec 06, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Dec 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Fix several memory leaks in tests.
Found by Valgrind.
parent
5b7fae2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
vartype.c
dlls/oleaut32/tests/vartype.c
+10
-1
No files found.
dlls/oleaut32/tests/vartype.c
View file @
0099431f
...
...
@@ -4855,6 +4855,7 @@ static void test_VarBstrFromR4(void)
*/
ok
(
memcmp
(
bstr
,
szNative
,
sizeof
(
szNative
))
==
0
,
"string different
\n
"
);
}
SysFreeString
(
bstr
);
}
f
=
-
0
.
0
;
...
...
@@ -4866,6 +4867,7 @@ static void test_VarBstrFromR4(void)
ok
(
memcmp
(
bstr
+
1
,
szZero
,
sizeof
(
szZero
))
==
0
,
"negative zero (got %s)
\n
"
,
wtoascii
(
bstr
));
else
ok
(
memcmp
(
bstr
,
szZero
,
sizeof
(
szZero
))
==
0
,
"negative zero (got %s)
\n
"
,
wtoascii
(
bstr
));
SysFreeString
(
bstr
);
}
/* The following tests that lcid is used for decimal separator even without LOCALE_USE_NLS */
...
...
@@ -4875,6 +4877,7 @@ static void test_VarBstrFromR4(void)
if
(
bstr
)
{
ok
(
memcmp
(
bstr
,
szOneHalf_English
,
sizeof
(
szOneHalf_English
))
==
0
,
"English locale failed (got %s)
\n
"
,
wtoascii
(
bstr
));
SysFreeString
(
bstr
);
}
f
=
0
.
5
;
hres
=
pVarBstrFromR4
(
f
,
lcid_spanish
,
LOCALE_NOUSEROVERRIDE
,
&
bstr
);
...
...
@@ -4882,12 +4885,13 @@ static void test_VarBstrFromR4(void)
if
(
bstr
)
{
ok
(
memcmp
(
bstr
,
szOneHalf_Spanish
,
sizeof
(
szOneHalf_Spanish
))
==
0
,
"Spanish locale failed (got %s)
\n
"
,
wtoascii
(
bstr
));
SysFreeString
(
bstr
);
}
}
#define BSTR_DATE(dt,str) SysFreeString(bstr); bstr = NULL; \
hres = pVarBstrFromDate(dt,lcid,LOCALE_NOUSEROVERRIDE,&bstr); \
if (bstr)
WideCharToMultiByte(CP_ACP, 0, bstr, -1, buff, sizeof(buff), 0, 0);
\
if (bstr)
{WideCharToMultiByte(CP_ACP, 0, bstr, -1, buff, sizeof(buff), 0, 0); SysFreeString(bstr);}
\
else buff[0] = 0; \
ok(hres == S_OK && !strcmp(str,buff), "Expected '%s', got '%s', hres = 0x%08x\n", \
str, buff, hres)
...
...
@@ -4920,6 +4924,7 @@ static void test_VarBstrFromDate(void)
if (hres== S_OK && bstr)\
{\
ok(lstrcmpW(bstr, e) == 0, "invalid number (got %s)\n", wtoascii(bstr));\
SysFreeString(bstr);\
}
static
void
test_VarBstrFromCy
(
void
)
...
...
@@ -4982,6 +4987,7 @@ static void test_VarBstrFromCy(void)
if (hres== S_OK && bstr)\
{\
ok(lstrcmpW(bstr, e) == 0, "invalid number (got %s)\n", wtoascii(bstr));\
SysFreeString(bstr);\
}
#define BSTR_DEC64(l, a, b, c, x, d, e) \
...
...
@@ -4991,6 +4997,7 @@ static void test_VarBstrFromCy(void)
if (hres== S_OK && bstr)\
{\
ok(lstrcmpW(bstr, e) == 0, "invalid number (got %s)\n", wtoascii(bstr));\
SysFreeString(bstr);\
}
static
void
test_VarBstrFromDec
(
void
)
...
...
@@ -5162,6 +5169,7 @@ static void test_VarBstrCmp(void)
VARBSTRCMP
(
bstr2
,
bstr
,
0
,
VARCMP_GT
);
SysFreeString
(
bstr2
);
SysFreeString
(
bstr
);
SysFreeString
(
bstrempty
);
}
/* Get the internal representation of a BSTR */
...
...
@@ -5858,6 +5866,7 @@ static void test_EmptyChangeTypeEx(void)
ok
(
hres
==
hExpected
&&
(
hres
!=
S_OK
||
V_VT
(
&
vDst
)
==
vt
),
"change empty: vt %d expected 0x%08x, got 0x%08x, vt %d
\n
"
,
vt
,
hExpected
,
hres
,
V_VT
(
&
vDst
));
if
(
hres
==
S_OK
)
VariantClear
(
&
vDst
);
}
}
...
...
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