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
fa77645e
Commit
fa77645e
authored
Nov 21, 2022
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd: Use standard C functions for memory allocation in regtask.c.
parent
e0b9fbe5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
regtask.c
dlls/taskschd/regtask.c
+14
-14
No files found.
dlls/taskschd/regtask.c
View file @
fa77645e
...
@@ -60,8 +60,8 @@ static ULONG WINAPI regtask_Release(IRegisteredTask *iface)
...
@@ -60,8 +60,8 @@ static ULONG WINAPI regtask_Release(IRegisteredTask *iface)
{
{
TRACE
(
"destroying %p
\n
"
,
iface
);
TRACE
(
"destroying %p
\n
"
,
iface
);
ITaskDefinition_Release
(
regtask
->
taskdef
);
ITaskDefinition_Release
(
regtask
->
taskdef
);
heap_
free
(
regtask
->
path
);
free
(
regtask
->
path
);
heap_
free
(
regtask
);
free
(
regtask
);
}
}
return
ref
;
return
ref
;
...
@@ -328,10 +328,10 @@ HRESULT RegisteredTask_create(const WCHAR *path, const WCHAR *name, ITaskDefinit
...
@@ -328,10 +328,10 @@ HRESULT RegisteredTask_create(const WCHAR *path, const WCHAR *name, ITaskDefinit
if
(
!
full_name
)
return
E_OUTOFMEMORY
;
if
(
!
full_name
)
return
E_OUTOFMEMORY
;
}
}
regtask
=
heap_
alloc
(
sizeof
(
*
regtask
));
regtask
=
m
alloc
(
sizeof
(
*
regtask
));
if
(
!
regtask
)
if
(
!
regtask
)
{
{
heap_
free
(
full_name
);
free
(
full_name
);
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
}
...
@@ -344,15 +344,15 @@ HRESULT RegisteredTask_create(const WCHAR *path, const WCHAR *name, ITaskDefinit
...
@@ -344,15 +344,15 @@ HRESULT RegisteredTask_create(const WCHAR *path, const WCHAR *name, ITaskDefinit
hr
=
ITaskDefinition_get_XmlText
(
definition
,
&
xml
);
hr
=
ITaskDefinition_get_XmlText
(
definition
,
&
xml
);
if
(
hr
!=
S_OK
||
(
hr
=
SchRpcRegisterTask
(
full_name
,
xml
,
flags
,
NULL
,
logon
,
0
,
NULL
,
&
actual_path
,
&
error_info
))
!=
S_OK
)
if
(
hr
!=
S_OK
||
(
hr
=
SchRpcRegisterTask
(
full_name
,
xml
,
flags
,
NULL
,
logon
,
0
,
NULL
,
&
actual_path
,
&
error_info
))
!=
S_OK
)
{
{
heap_
free
(
full_name
);
free
(
full_name
);
heap_
free
(
regtask
);
free
(
regtask
);
SysFreeString
(
xml
);
SysFreeString
(
xml
);
return
hr
;
return
hr
;
}
}
SysFreeString
(
xml
);
SysFreeString
(
xml
);
heap_
free
(
full_name
);
free
(
full_name
);
full_name
=
heap_strdupW
(
actual_path
);
full_name
=
wcsdup
(
actual_path
);
MIDL_user_free
(
actual_path
);
MIDL_user_free
(
actual_path
);
}
}
else
else
...
@@ -363,8 +363,8 @@ HRESULT RegisteredTask_create(const WCHAR *path, const WCHAR *name, ITaskDefinit
...
@@ -363,8 +363,8 @@ HRESULT RegisteredTask_create(const WCHAR *path, const WCHAR *name, ITaskDefinit
hr
=
SchRpcRetrieveTask
(
full_name
,
L""
,
&
count
,
&
xml
);
hr
=
SchRpcRetrieveTask
(
full_name
,
L""
,
&
count
,
&
xml
);
if
(
hr
!=
S_OK
||
(
hr
=
ITaskDefinition_put_XmlText
(
definition
,
xml
))
!=
S_OK
)
if
(
hr
!=
S_OK
||
(
hr
=
ITaskDefinition_put_XmlText
(
definition
,
xml
))
!=
S_OK
)
{
{
heap_
free
(
full_name
);
free
(
full_name
);
heap_
free
(
regtask
);
free
(
regtask
);
MIDL_user_free
(
xml
);
MIDL_user_free
(
xml
);
return
hr
;
return
hr
;
}
}
...
@@ -408,8 +408,8 @@ static ULONG WINAPI regtasks_Release(IRegisteredTaskCollection *iface)
...
@@ -408,8 +408,8 @@ static ULONG WINAPI regtasks_Release(IRegisteredTaskCollection *iface)
if
(
!
ref
)
if
(
!
ref
)
{
{
TRACE
(
"destroying %p
\n
"
,
iface
);
TRACE
(
"destroying %p
\n
"
,
iface
);
heap_
free
(
regtasks
->
path
);
free
(
regtasks
->
path
);
heap_
free
(
regtasks
);
free
(
regtasks
);
}
}
return
ref
;
return
ref
;
...
@@ -499,12 +499,12 @@ HRESULT RegisteredTaskCollection_create(const WCHAR *path, IRegisteredTaskCollec
...
@@ -499,12 +499,12 @@ HRESULT RegisteredTaskCollection_create(const WCHAR *path, IRegisteredTaskCollec
{
{
RegisteredTaskCollection
*
regtasks
;
RegisteredTaskCollection
*
regtasks
;
regtasks
=
heap_
alloc
(
sizeof
(
*
regtasks
));
regtasks
=
m
alloc
(
sizeof
(
*
regtasks
));
if
(
!
regtasks
)
return
E_OUTOFMEMORY
;
if
(
!
regtasks
)
return
E_OUTOFMEMORY
;
regtasks
->
IRegisteredTaskCollection_iface
.
lpVtbl
=
&
RegisteredTaskCollection_vtbl
;
regtasks
->
IRegisteredTaskCollection_iface
.
lpVtbl
=
&
RegisteredTaskCollection_vtbl
;
regtasks
->
ref
=
1
;
regtasks
->
ref
=
1
;
regtasks
->
path
=
heap_strdupW
(
path
);
regtasks
->
path
=
wcsdup
(
path
);
*
obj
=
&
regtasks
->
IRegisteredTaskCollection_iface
;
*
obj
=
&
regtasks
->
IRegisteredTaskCollection_iface
;
TRACE
(
"created %p
\n
"
,
*
obj
);
TRACE
(
"created %p
\n
"
,
*
obj
);
...
...
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