Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a2484183
Commit
a2484183
authored
Apr 17, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
May 05, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox/tests: Fix memory leak when tests are skipped.
parent
a5414e8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
query.c
dlls/wbemprox/tests/query.c
+5
-3
No files found.
dlls/wbemprox/tests/query.c
View file @
a2484183
...
@@ -158,7 +158,7 @@ static void test_Win32_Service( IWbemServices *services )
...
@@ -158,7 +158,7 @@ static void test_Win32_Service( IWbemServices *services )
if
(
hr
!=
S_OK
)
if
(
hr
!=
S_OK
)
{
{
win_skip
(
"Win32_Service not available
\n
"
);
win_skip
(
"Win32_Service not available
\n
"
);
return
;
goto
out
;
}
}
type
=
0xdeadbeef
;
type
=
0xdeadbeef
;
VariantInit
(
&
state
);
VariantInit
(
&
state
);
...
@@ -232,6 +232,7 @@ static void test_Win32_Service( IWbemServices *services )
...
@@ -232,6 +232,7 @@ static void test_Win32_Service( IWbemServices *services )
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
if
(
service
)
IWbemClassObject_Release
(
service
);
if
(
service
)
IWbemClassObject_Release
(
service
);
out:
SysFreeString
(
empty
);
SysFreeString
(
empty
);
SysFreeString
(
class
);
SysFreeString
(
class
);
}
}
...
@@ -373,14 +374,14 @@ static void test_Win32_ComputerSystem( IWbemServices *services )
...
@@ -373,14 +374,14 @@ static void test_Win32_ComputerSystem( IWbemServices *services )
if
(
!
compname
[
0
]
||
!
username
[
0
])
if
(
!
compname
[
0
]
||
!
username
[
0
])
{
{
skip
(
"Failed to get user or computer name
\n
"
);
skip
(
"Failed to get user or computer name
\n
"
);
return
;
goto
out
;
}
}
hr
=
IWbemServices_ExecQuery
(
services
,
wql
,
query
,
0
,
NULL
,
&
result
);
hr
=
IWbemServices_ExecQuery
(
services
,
wql
,
query
,
0
,
NULL
,
&
result
);
if
(
hr
!=
S_OK
)
if
(
hr
!=
S_OK
)
{
{
win_skip
(
"Win32_ComputerSystem not available
\n
"
);
win_skip
(
"Win32_ComputerSystem not available
\n
"
);
return
;
goto
out
;
}
}
hr
=
IEnumWbemClassObject_Next
(
result
,
10000
,
1
,
&
service
,
&
count
);
hr
=
IEnumWbemClassObject_Next
(
result
,
10000
,
1
,
&
service
,
&
count
);
...
@@ -406,6 +407,7 @@ static void test_Win32_ComputerSystem( IWbemServices *services )
...
@@ -406,6 +407,7 @@ static void test_Win32_ComputerSystem( IWbemServices *services )
IWbemClassObject_Release
(
service
);
IWbemClassObject_Release
(
service
);
IEnumWbemClassObject_Release
(
result
);
IEnumWbemClassObject_Release
(
result
);
out:
SysFreeString
(
query
);
SysFreeString
(
query
);
SysFreeString
(
wql
);
SysFreeString
(
wql
);
}
}
...
...
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