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
c6d4df8b
Commit
c6d4df8b
authored
Dec 15, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Dec 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Fix several memory leaks in the tests.
Found by Valgrind.
parent
f7be3645
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
stg_prop.c
dlls/ole32/tests/stg_prop.c
+6
-0
No files found.
dlls/ole32/tests/stg_prop.c
View file @
c6d4df8b
...
@@ -178,6 +178,7 @@ static void testProps(void)
...
@@ -178,6 +178,7 @@ static void testProps(void)
ok
(
var
.
vt
==
VT_LPSTR
&&
!
lstrcmpA
(
U
(
var
).
pszVal
,
val
),
ok
(
var
.
vt
==
VT_LPSTR
&&
!
lstrcmpA
(
U
(
var
).
pszVal
,
val
),
"Didn't get expected type or value for property (got type %d, value %s)
\n
"
,
"Didn't get expected type or value for property (got type %d, value %s)
\n
"
,
var
.
vt
,
U
(
var
).
pszVal
);
var
.
vt
,
U
(
var
).
pszVal
);
PropVariantClear
(
&
var
);
/* read clipboard format */
/* read clipboard format */
spec
.
ulKind
=
PRSPEC_PROPID
;
spec
.
ulKind
=
PRSPEC_PROPID
;
...
@@ -282,6 +283,7 @@ static void testProps(void)
...
@@ -282,6 +283,7 @@ static void testProps(void)
ok
(
var
.
vt
==
VT_LPSTR
&&
!
lstrcmpA
(
U
(
var
).
pszVal
,
val
),
ok
(
var
.
vt
==
VT_LPSTR
&&
!
lstrcmpA
(
U
(
var
).
pszVal
,
val
),
"Didn't get expected type or value for property (got type %d, value %s)
\n
"
,
"Didn't get expected type or value for property (got type %d, value %s)
\n
"
,
var
.
vt
,
U
(
var
).
pszVal
);
var
.
vt
,
U
(
var
).
pszVal
);
PropVariantClear
(
&
var
);
IPropertyStorage_Release
(
propertyStorage
);
IPropertyStorage_Release
(
propertyStorage
);
IPropertySetStorage_Release
(
propSetStorage
);
IPropertySetStorage_Release
(
propSetStorage
);
...
@@ -364,11 +366,13 @@ static void testCodepage(void)
...
@@ -364,11 +366,13 @@ static void testCodepage(void)
ok
(
hr
==
S_OK
,
"ReadMultiple failed: 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ReadMultiple failed: 0x%08x
\n
"
,
hr
);
ok
(
var
.
vt
==
VT_LPSTR
&&
!
strcmp
(
U
(
var
).
pszVal
,
"hi"
),
ok
(
var
.
vt
==
VT_LPSTR
&&
!
strcmp
(
U
(
var
).
pszVal
,
"hi"
),
"Didn't get expected type or value for property
\n
"
);
"Didn't get expected type or value for property
\n
"
);
PropVariantClear
(
&
var
);
/* This seemingly non-sensical test is to show that the string is indeed
/* This seemingly non-sensical test is to show that the string is indeed
* interpreted according to the current system code page, not according to
* interpreted according to the current system code page, not according to
* the property set's code page. (If the latter were true, the whole
* the property set's code page. (If the latter were true, the whole
* string would be maintained. As it is, only the first character is.)
* string would be maintained. As it is, only the first character is.)
*/
*/
var
.
vt
=
VT_LPSTR
;
U
(
var
).
pszVal
=
(
LPSTR
)
wval
;
U
(
var
).
pszVal
=
(
LPSTR
)
wval
;
hr
=
IPropertyStorage_WriteMultiple
(
propertyStorage
,
1
,
&
spec
,
&
var
,
0
);
hr
=
IPropertyStorage_WriteMultiple
(
propertyStorage
,
1
,
&
spec
,
&
var
,
0
);
ok
(
hr
==
S_OK
,
"WriteMultiple failed: 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"WriteMultiple failed: 0x%08x
\n
"
,
hr
);
...
@@ -376,6 +380,8 @@ static void testCodepage(void)
...
@@ -376,6 +380,8 @@ static void testCodepage(void)
ok
(
hr
==
S_OK
,
"ReadMultiple failed: 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ReadMultiple failed: 0x%08x
\n
"
,
hr
);
ok
(
var
.
vt
==
VT_LPSTR
&&
!
strcmp
(
U
(
var
).
pszVal
,
"h"
),
ok
(
var
.
vt
==
VT_LPSTR
&&
!
strcmp
(
U
(
var
).
pszVal
,
"h"
),
"Didn't get expected type or value for property
\n
"
);
"Didn't get expected type or value for property
\n
"
);
PropVariantClear
(
&
var
);
/* now that a property's been set, you can't change the code page */
/* now that a property's been set, you can't change the code page */
spec
.
ulKind
=
PRSPEC_PROPID
;
spec
.
ulKind
=
PRSPEC_PROPID
;
U
(
spec
).
propid
=
PID_CODEPAGE
;
U
(
spec
).
propid
=
PID_CODEPAGE
;
...
...
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