mstask: Switch to using heap wrappers.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7b6b34d0c9
commit
98241dfa5a
|
@ -82,10 +82,10 @@ static void TaskDestructor(TaskImpl *This)
|
|||
if (This->action)
|
||||
IExecAction_Release(This->action);
|
||||
ITaskDefinition_Release(This->task);
|
||||
HeapFree(GetProcessHeap(), 0, This->task_name);
|
||||
HeapFree(GetProcessHeap(), 0, This->accountName);
|
||||
HeapFree(GetProcessHeap(), 0, This->trigger);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
heap_free(This->task_name);
|
||||
heap_free(This->accountName);
|
||||
heap_free(This->trigger);
|
||||
heap_free(This);
|
||||
InterlockedDecrement(&dll_ref);
|
||||
}
|
||||
|
||||
|
@ -505,11 +505,11 @@ static HRESULT WINAPI MSTASK_ITask_SetAccountInformation(
|
|||
FIXME("Partial stub ignores passwords\n");
|
||||
|
||||
n = (lstrlenW(pwszAccountName) + 1);
|
||||
tmp_account_name = HeapAlloc(GetProcessHeap(), 0, n * sizeof(WCHAR));
|
||||
tmp_account_name = heap_alloc(n * sizeof(WCHAR));
|
||||
if (!tmp_account_name)
|
||||
return E_OUTOFMEMORY;
|
||||
lstrcpyW(tmp_account_name, pwszAccountName);
|
||||
HeapFree(GetProcessHeap(), 0, This->accountName);
|
||||
heap_free(This->accountName);
|
||||
This->accountName = tmp_account_name;
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -554,7 +554,7 @@ static HRESULT WINAPI MSTASK_ITask_SetApplicationName(ITask *iface, LPCWSTR appn
|
|||
LPWSTR tmp_name;
|
||||
HRESULT hr;
|
||||
|
||||
tmp_name = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||
tmp_name = heap_alloc(len * sizeof(WCHAR));
|
||||
if (!tmp_name)
|
||||
return E_OUTOFMEMORY;
|
||||
len = SearchPathW(NULL, appname, NULL, len, tmp_name, NULL);
|
||||
|
@ -563,7 +563,7 @@ static HRESULT WINAPI MSTASK_ITask_SetApplicationName(ITask *iface, LPCWSTR appn
|
|||
else
|
||||
hr = HRESULT_FROM_WIN32(GetLastError());
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, tmp_name);
|
||||
heap_free(tmp_name);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
@ -1332,7 +1332,7 @@ failed:
|
|||
DeleteFileW(task_name);
|
||||
else if (remember)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, This->task_name);
|
||||
heap_free(This->task_name);
|
||||
This->task_name = heap_strdupW(task_name);
|
||||
}
|
||||
return hr;
|
||||
|
@ -1442,7 +1442,7 @@ HRESULT TaskConstructor(ITaskService *service, const WCHAR *name, ITask **task)
|
|||
hr = ITaskService_NewTask(service, 0, &taskdef);
|
||||
if (hr != S_OK) return hr;
|
||||
|
||||
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
|
||||
This = heap_alloc(sizeof(*This));
|
||||
if (!This)
|
||||
{
|
||||
ITaskDefinition_Release(taskdef);
|
||||
|
|
|
@ -59,7 +59,7 @@ static void TaskSchedulerDestructor(TaskSchedulerImpl *This)
|
|||
{
|
||||
TRACE("%p\n", This);
|
||||
ITaskService_Release(This->service);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
heap_free(This);
|
||||
InterlockedDecrement(&dll_ref);
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ static ULONG WINAPI EnumWorkItems_Release(IEnumWorkItems *iface)
|
|||
|
||||
if (ref == 0)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
heap_free(This);
|
||||
InterlockedDecrement(&dll_ref);
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ static HRESULT create_task_enum(IEnumWorkItems **ret)
|
|||
|
||||
*ret = NULL;
|
||||
|
||||
tasks = HeapAlloc(GetProcessHeap(), 0, sizeof(*tasks));
|
||||
tasks = heap_alloc(sizeof(*tasks));
|
||||
if (!tasks)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
|
@ -402,7 +402,7 @@ HRESULT TaskSchedulerConstructor(LPVOID *ppObj)
|
|||
return hr;
|
||||
}
|
||||
|
||||
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
|
||||
This = heap_alloc(sizeof(*This));
|
||||
if (!This)
|
||||
{
|
||||
ITaskService_Release(service);
|
||||
|
|
|
@ -86,7 +86,7 @@ static ULONG WINAPI MSTASK_ITaskTrigger_Release(
|
|||
ref = InterlockedDecrement(&This->ref);
|
||||
if (ref == 0)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
heap_free(This);
|
||||
InterlockedDecrement(&dll_ref);
|
||||
}
|
||||
return ref;
|
||||
|
@ -288,7 +288,7 @@ HRESULT TaskTriggerConstructor(LPVOID *ppObj)
|
|||
SYSTEMTIME time;
|
||||
TRACE("(%p)\n", ppObj);
|
||||
|
||||
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
|
||||
This = heap_alloc(sizeof(*This));
|
||||
if (!This)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
|
|
Loading…
Reference in New Issue