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
98241dfa
Commit
98241dfa
authored
Apr 26, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask: Switch to using heap wrappers.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7b6b34d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
task.c
dlls/mstask/task.c
+10
-10
task_scheduler.c
dlls/mstask/task_scheduler.c
+4
-4
task_trigger.c
dlls/mstask/task_trigger.c
+2
-2
No files found.
dlls/mstask/task.c
View file @
98241dfa
...
...
@@ -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
);
...
...
dlls/mstask/task_scheduler.c
View file @
98241dfa
...
...
@@ -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
);
...
...
dlls/mstask/task_trigger.c
View file @
98241dfa
...
...
@@ -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
;
...
...
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