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
80b572e8
Commit
80b572e8
authored
Jan 13, 2019
by
Sven Baars
Committed by
Alexandre Julliard
Jan 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask/tests: Fix some memory leaks (Valgrind).
Signed-off-by:
Sven Baars
<
sven.wine@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5b87378b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
task.c
dlls/mstask/tests/task.c
+1
-0
task_scheduler.c
dlls/mstask/tests/task_scheduler.c
+5
-0
No files found.
dlls/mstask/tests/task.c
View file @
80b572e8
...
...
@@ -760,6 +760,7 @@ static void test_workitem_data(void)
ok
(
count
==
sizeof
(
hello
),
"got %u
\n
"
,
count
);
ok
(
data
!=
NULL
,
"got NULL
\n
"
);
ok
(
!
memcmp
(
data
,
hello
,
sizeof
(
hello
)),
"data mismatch
\n
"
);
CoTaskMemFree
(
data
);
hr
=
ITask_SetWorkItemData
(
task
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
...
...
dlls/mstask/tests/task_scheduler.c
View file @
80b572e8
...
...
@@ -329,11 +329,13 @@ static void test_save_task_curfile(ITask *task)
hr
=
IPersistFile_Save
(
pfile
,
NULL
,
TRUE
);
ok
(
hr
==
S_OK
,
"Save error %#x
\n
"
,
hr
);
CoTaskMemFree
(
curfile
);
curfile
=
NULL
;
hr
=
IPersistFile_GetCurFile
(
pfile
,
&
curfile
);
ok
(
hr
==
S_OK
,
"GetCurFile error %#x
\n
"
,
hr
);
ok
(
curfile
&&
curfile
[
0
]
,
"curfile should not be NULL
\n
"
);
CoTaskMemFree
(
curfile
);
IPersistFile_Release
(
pfile
);
}
...
...
@@ -454,18 +456,21 @@ static void test_task_storage(void)
curfile
=
get_task_curfile
(
task
,
TRUE
,
FALSE
,
__LINE__
);
ok
(
file_exists
(
curfile
),
"curfile should exist
\n
"
);
ok
(
!
lstrcmpW
(
curfile
,
task2_full_name
),
"name is wrong %s
\n
"
,
wine_dbgstr_w
(
curfile
));
CoTaskMemFree
(
curfile
);
hr
=
ITaskScheduler_AddWorkItem
(
scheduler
,
Task3
,
(
IScheduledWorkItem
*
)
task
);
ok
(
hr
==
S_OK
,
"AddWorkItem error %#x
\n
"
,
hr
);
curfile
=
get_task_curfile
(
task
,
TRUE
,
FALSE
,
__LINE__
);
ok
(
file_exists
(
curfile
),
"curfile should exist
\n
"
);
ok
(
!
lstrcmpW
(
curfile
,
task3_full_name
),
"name is wrong %s
\n
"
,
wine_dbgstr_w
(
curfile
));
CoTaskMemFree
(
curfile
);
hr
=
ITaskScheduler_AddWorkItem
(
scheduler
,
Task1
,
(
IScheduledWorkItem
*
)
task
);
ok
(
hr
==
S_OK
,
"AddWorkItem error %#x
\n
"
,
hr
);
curfile
=
get_task_curfile
(
task
,
TRUE
,
FALSE
,
__LINE__
);
ok
(
file_exists
(
curfile
),
"curfile should exist
\n
"
);
ok
(
!
lstrcmpW
(
curfile
,
task1_full_name
),
"name is wrong %s
\n
"
,
wine_dbgstr_w
(
curfile
));
CoTaskMemFree
(
curfile
);
hr
=
ITaskScheduler_AddWorkItem
(
scheduler
,
Task1
,
(
IScheduledWorkItem
*
)
task
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_EXISTS
),
"wrong error %#x
\n
"
,
hr
);
...
...
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