Signed-off-by: Sven Baars sven.wine@gmail.com --- dlls/mstask/tests/task.c | 1 + dlls/mstask/tests/task_scheduler.c | 5 +++++ 2 files changed, 6 insertions(+)
diff --git a/dlls/mstask/tests/task.c b/dlls/mstask/tests/task.c index 4e8386a008..6195194d61 100644 --- a/dlls/mstask/tests/task.c +++ b/dlls/mstask/tests/task.c @@ -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); diff --git a/dlls/mstask/tests/task_scheduler.c b/dlls/mstask/tests/task_scheduler.c index f61022575d..5abee75e23 100644 --- a/dlls/mstask/tests/task_scheduler.c +++ b/dlls/mstask/tests/task_scheduler.c @@ -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);