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
9f298125
Commit
9f298125
authored
Dec 01, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Dec 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd: Use CRT functions for remaining heap allocations.
parent
ede777d1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
21 deletions
+19
-21
folder.c
dlls/taskschd/folder.c
+8
-8
task.c
dlls/taskschd/task.c
+11
-11
taskschd_private.h
dlls/taskschd/taskschd_private.h
+0
-2
No files found.
dlls/taskschd/folder.c
View file @
9f298125
...
@@ -58,8 +58,8 @@ static ULONG WINAPI TaskFolder_Release(ITaskFolder *iface)
...
@@ -58,8 +58,8 @@ static ULONG WINAPI TaskFolder_Release(ITaskFolder *iface)
if
(
!
ref
)
if
(
!
ref
)
{
{
TRACE
(
"destroying %p
\n
"
,
iface
);
TRACE
(
"destroying %p
\n
"
,
iface
);
heap_
free
(
folder
->
path
);
free
(
folder
->
path
);
heap_
free
(
folder
);
free
(
folder
);
}
}
return
ref
;
return
ref
;
...
@@ -211,7 +211,7 @@ WCHAR *get_full_path(const WCHAR *parent, const WCHAR *path)
...
@@ -211,7 +211,7 @@ WCHAR *get_full_path(const WCHAR *parent, const WCHAR *path)
if
(
parent
)
len
+=
lstrlenW
(
parent
);
if
(
parent
)
len
+=
lstrlenW
(
parent
);
/* +1 if parent is not '\' terminated */
/* +1 if parent is not '\' terminated */
folder_path
=
heap_
alloc
((
len
+
2
)
*
sizeof
(
WCHAR
));
folder_path
=
m
alloc
((
len
+
2
)
*
sizeof
(
WCHAR
));
if
(
!
folder_path
)
return
NULL
;
if
(
!
folder_path
)
return
NULL
;
folder_path
[
0
]
=
0
;
folder_path
[
0
]
=
0
;
...
@@ -253,7 +253,7 @@ static HRESULT WINAPI TaskFolder_DeleteFolder(ITaskFolder *iface, BSTR name, LON
...
@@ -253,7 +253,7 @@ static HRESULT WINAPI TaskFolder_DeleteFolder(ITaskFolder *iface, BSTR name, LON
if
(
!
folder_path
)
return
E_OUTOFMEMORY
;
if
(
!
folder_path
)
return
E_OUTOFMEMORY
;
hr
=
SchRpcDelete
(
folder_path
,
0
);
hr
=
SchRpcDelete
(
folder_path
,
0
);
heap_
free
(
folder_path
);
free
(
folder_path
);
return
hr
;
return
hr
;
}
}
...
@@ -304,7 +304,7 @@ static HRESULT WINAPI TaskFolder_DeleteTask(ITaskFolder *iface, BSTR name, LONG
...
@@ -304,7 +304,7 @@ static HRESULT WINAPI TaskFolder_DeleteTask(ITaskFolder *iface, BSTR name, LONG
if
(
!
folder_path
)
return
E_OUTOFMEMORY
;
if
(
!
folder_path
)
return
E_OUTOFMEMORY
;
hr
=
SchRpcDelete
(
folder_path
,
0
);
hr
=
SchRpcDelete
(
folder_path
,
0
);
heap_
free
(
folder_path
);
free
(
folder_path
);
return
hr
;
return
hr
;
}
}
...
@@ -448,14 +448,14 @@ HRESULT TaskFolder_create(const WCHAR *parent, const WCHAR *path, ITaskFolder **
...
@@ -448,14 +448,14 @@ HRESULT TaskFolder_create(const WCHAR *parent, const WCHAR *path, ITaskFolder **
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
heap_
free
(
folder_path
);
free
(
folder_path
);
return
hr
;
return
hr
;
}
}
folder
=
heap_
alloc
(
sizeof
(
*
folder
));
folder
=
m
alloc
(
sizeof
(
*
folder
));
if
(
!
folder
)
if
(
!
folder
)
{
{
heap_
free
(
folder_path
);
free
(
folder_path
);
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
}
...
...
dlls/taskschd/task.c
View file @
9f298125
...
@@ -310,7 +310,7 @@ static HRESULT DailyTrigger_create(ITrigger **trigger)
...
@@ -310,7 +310,7 @@ static HRESULT DailyTrigger_create(ITrigger **trigger)
{
{
DailyTrigger
*
daily_trigger
;
DailyTrigger
*
daily_trigger
;
daily_trigger
=
heap_
alloc
(
sizeof
(
*
daily_trigger
));
daily_trigger
=
m
alloc
(
sizeof
(
*
daily_trigger
));
if
(
!
daily_trigger
)
if
(
!
daily_trigger
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
...
@@ -809,7 +809,7 @@ static HRESULT RegistrationInfo_create(IRegistrationInfo **obj)
...
@@ -809,7 +809,7 @@ static HRESULT RegistrationInfo_create(IRegistrationInfo **obj)
{
{
registration_info
*
reginfo
;
registration_info
*
reginfo
;
reginfo
=
heap_alloc_zero
(
sizeof
(
*
reginfo
));
reginfo
=
calloc
(
1
,
sizeof
(
*
reginfo
));
if
(
!
reginfo
)
return
E_OUTOFMEMORY
;
if
(
!
reginfo
)
return
E_OUTOFMEMORY
;
reginfo
->
IRegistrationInfo_iface
.
lpVtbl
=
&
RegistrationInfo_vtbl
;
reginfo
->
IRegistrationInfo_iface
.
lpVtbl
=
&
RegistrationInfo_vtbl
;
...
@@ -1442,7 +1442,7 @@ static HRESULT TaskSettings_create(ITaskSettings **obj)
...
@@ -1442,7 +1442,7 @@ static HRESULT TaskSettings_create(ITaskSettings **obj)
{
{
TaskSettings
*
taskset
;
TaskSettings
*
taskset
;
taskset
=
heap_
alloc
(
sizeof
(
*
taskset
));
taskset
=
m
alloc
(
sizeof
(
*
taskset
));
if
(
!
taskset
)
return
E_OUTOFMEMORY
;
if
(
!
taskset
)
return
E_OUTOFMEMORY
;
taskset
->
ITaskSettings_iface
.
lpVtbl
=
&
TaskSettings_vtbl
;
taskset
->
ITaskSettings_iface
.
lpVtbl
=
&
TaskSettings_vtbl
;
...
@@ -1650,7 +1650,7 @@ static HRESULT Principal_create(IPrincipal **obj)
...
@@ -1650,7 +1650,7 @@ static HRESULT Principal_create(IPrincipal **obj)
{
{
Principal
*
principal
;
Principal
*
principal
;
principal
=
heap_
alloc
(
sizeof
(
*
principal
));
principal
=
m
alloc
(
sizeof
(
*
principal
));
if
(
!
principal
)
return
E_OUTOFMEMORY
;
if
(
!
principal
)
return
E_OUTOFMEMORY
;
principal
->
IPrincipal_iface
.
lpVtbl
=
&
Principal_vtbl
;
principal
->
IPrincipal_iface
.
lpVtbl
=
&
Principal_vtbl
;
...
@@ -1897,7 +1897,7 @@ static HRESULT ExecAction_create(IExecAction **obj)
...
@@ -1897,7 +1897,7 @@ static HRESULT ExecAction_create(IExecAction **obj)
{
{
ExecAction
*
action
;
ExecAction
*
action
;
action
=
heap_
alloc
(
sizeof
(
*
action
));
action
=
m
alloc
(
sizeof
(
*
action
));
if
(
!
action
)
return
E_OUTOFMEMORY
;
if
(
!
action
)
return
E_OUTOFMEMORY
;
action
->
IExecAction_iface
.
lpVtbl
=
&
Action_vtbl
;
action
->
IExecAction_iface
.
lpVtbl
=
&
Action_vtbl
;
...
@@ -2086,7 +2086,7 @@ static HRESULT Actions_create(IActionCollection **obj)
...
@@ -2086,7 +2086,7 @@ static HRESULT Actions_create(IActionCollection **obj)
{
{
Actions
*
actions
;
Actions
*
actions
;
actions
=
heap_
alloc
(
sizeof
(
*
actions
));
actions
=
m
alloc
(
sizeof
(
*
actions
));
if
(
!
actions
)
return
E_OUTOFMEMORY
;
if
(
!
actions
)
return
E_OUTOFMEMORY
;
actions
->
IActionCollection_iface
.
lpVtbl
=
&
Actions_vtbl
;
actions
->
IActionCollection_iface
.
lpVtbl
=
&
Actions_vtbl
;
...
@@ -2242,7 +2242,7 @@ static HRESULT WINAPI TaskDefinition_get_Triggers(ITaskDefinition *iface, ITrigg
...
@@ -2242,7 +2242,7 @@ static HRESULT WINAPI TaskDefinition_get_Triggers(ITaskDefinition *iface, ITrigg
{
{
trigger_collection
*
collection
;
trigger_collection
*
collection
;
collection
=
heap_
alloc
(
sizeof
(
*
collection
));
collection
=
m
alloc
(
sizeof
(
*
collection
));
if
(
!
collection
)
return
E_OUTOFMEMORY
;
if
(
!
collection
)
return
E_OUTOFMEMORY
;
collection
->
ITriggerCollection_iface
.
lpVtbl
=
&
TriggerCollection_vtbl
;
collection
->
ITriggerCollection_iface
.
lpVtbl
=
&
TriggerCollection_vtbl
;
...
@@ -3668,7 +3668,7 @@ HRESULT TaskDefinition_create(ITaskDefinition **obj)
...
@@ -3668,7 +3668,7 @@ HRESULT TaskDefinition_create(ITaskDefinition **obj)
{
{
TaskDefinition
*
taskdef
;
TaskDefinition
*
taskdef
;
taskdef
=
heap_alloc_zero
(
sizeof
(
*
taskdef
));
taskdef
=
calloc
(
1
,
sizeof
(
*
taskdef
));
if
(
!
taskdef
)
return
E_OUTOFMEMORY
;
if
(
!
taskdef
)
return
E_OUTOFMEMORY
;
taskdef
->
ITaskDefinition_iface
.
lpVtbl
=
&
TaskDefinition_vtbl
;
taskdef
->
ITaskDefinition_iface
.
lpVtbl
=
&
TaskDefinition_vtbl
;
...
@@ -3998,7 +3998,7 @@ HRESULT TaskService_create(void **obj)
...
@@ -3998,7 +3998,7 @@ HRESULT TaskService_create(void **obj)
{
{
TaskService
*
task_svc
;
TaskService
*
task_svc
;
task_svc
=
heap_
alloc
(
sizeof
(
*
task_svc
));
task_svc
=
m
alloc
(
sizeof
(
*
task_svc
));
if
(
!
task_svc
)
return
E_OUTOFMEMORY
;
if
(
!
task_svc
)
return
E_OUTOFMEMORY
;
task_svc
->
ITaskService_iface
.
lpVtbl
=
&
TaskService_vtbl
;
task_svc
->
ITaskService_iface
.
lpVtbl
=
&
TaskService_vtbl
;
...
@@ -4013,10 +4013,10 @@ HRESULT TaskService_create(void **obj)
...
@@ -4013,10 +4013,10 @@ HRESULT TaskService_create(void **obj)
void
__RPC_FAR
*
__RPC_USER
MIDL_user_allocate
(
SIZE_T
n
)
void
__RPC_FAR
*
__RPC_USER
MIDL_user_allocate
(
SIZE_T
n
)
{
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
n
);
return
malloc
(
n
);
}
}
void
__RPC_USER
MIDL_user_free
(
void
__RPC_FAR
*
p
)
void
__RPC_USER
MIDL_user_free
(
void
__RPC_FAR
*
p
)
{
{
HeapFree
(
GetProcessHeap
(),
0
,
p
);
free
(
p
);
}
}
dlls/taskschd/taskschd_private.h
View file @
9f298125
...
@@ -19,8 +19,6 @@
...
@@ -19,8 +19,6 @@
#ifndef __WINE_TASKSCHD_PRIVATE_H__
#ifndef __WINE_TASKSCHD_PRIVATE_H__
#define __WINE_TASKSCHD_PRIVATE_H__
#define __WINE_TASKSCHD_PRIVATE_H__
#include "wine/heap.h"
HRESULT
TaskService_create
(
void
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
TaskService_create
(
void
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
TaskDefinition_create
(
ITaskDefinition
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
TaskDefinition_create
(
ITaskDefinition
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
TaskFolder_create
(
const
WCHAR
*
parent
,
const
WCHAR
*
path
,
ITaskFolder
**
obj
,
BOOL
create
)
DECLSPEC_HIDDEN
;
HRESULT
TaskFolder_create
(
const
WCHAR
*
parent
,
const
WCHAR
*
path
,
ITaskFolder
**
obj
,
BOOL
create
)
DECLSPEC_HIDDEN
;
...
...
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