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
77a7094b
Commit
77a7094b
authored
Dec 01, 2017
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd: Consistently check for allocation failure.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7aa67f1e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
26 deletions
+34
-26
folder_collection.c
dlls/taskschd/folder_collection.c
+5
-1
task.c
dlls/taskschd/task.c
+29
-25
No files found.
dlls/taskschd/folder_collection.c
View file @
77a7094b
...
...
@@ -236,7 +236,11 @@ HRESULT TaskFolderCollection_create(const WCHAR *path, ITaskFolderCollection **o
folders
->
ITaskFolderCollection_iface
.
lpVtbl
=
&
TaskFolderCollection_vtbl
;
folders
->
ref
=
1
;
folders
->
path
=
heap_strdupW
(
path
);
if
(
!
(
folders
->
path
=
heap_strdupW
(
path
)))
{
heap_free
(
folders
);
return
E_OUTOFMEMORY
;
}
folders
->
count
=
count
;
folders
->
list
=
list
;
*
obj
=
&
folders
->
ITaskFolderCollection_iface
;
...
...
dlls/taskschd/task.c
View file @
77a7094b
...
...
@@ -542,7 +542,9 @@ static HRESULT WINAPI RegistrationInfo_get_Description(IRegistrationInfo *iface,
if
(
!
description
)
return
E_POINTER
;
*
description
=
SysAllocString
(
reginfo
->
description
);
if
(
!
reginfo
->
description
)
*
description
=
NULL
;
else
if
(
!
(
*
description
=
SysAllocString
(
reginfo
->
description
)))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
@@ -568,7 +570,9 @@ static HRESULT WINAPI RegistrationInfo_get_Author(IRegistrationInfo *iface, BSTR
if
(
!
author
)
return
E_POINTER
;
*
author
=
SysAllocString
(
reginfo
->
author
);
if
(
!
reginfo
->
author
)
*
author
=
NULL
;
else
if
(
!
(
*
author
=
SysAllocString
(
reginfo
->
author
)))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
@@ -594,7 +598,9 @@ static HRESULT WINAPI RegistrationInfo_get_Version(IRegistrationInfo *iface, BST
if
(
!
version
)
return
E_POINTER
;
*
version
=
SysAllocString
(
reginfo
->
version
);
if
(
!
reginfo
->
version
)
*
version
=
NULL
;
else
if
(
!
(
*
version
=
SysAllocString
(
reginfo
->
version
)))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
@@ -620,7 +626,9 @@ static HRESULT WINAPI RegistrationInfo_get_Date(IRegistrationInfo *iface, BSTR *
if
(
!
date
)
return
E_POINTER
;
*
date
=
SysAllocString
(
reginfo
->
date
);
if
(
!
reginfo
->
date
)
*
date
=
NULL
;
else
if
(
!
(
*
date
=
SysAllocString
(
reginfo
->
date
)))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
@@ -646,7 +654,9 @@ static HRESULT WINAPI RegistrationInfo_get_Documentation(IRegistrationInfo *ifac
if
(
!
doc
)
return
E_POINTER
;
*
doc
=
SysAllocString
(
reginfo
->
documentation
);
if
(
!
reginfo
->
documentation
)
*
doc
=
NULL
;
else
if
(
!
(
*
doc
=
SysAllocString
(
reginfo
->
documentation
)))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
@@ -684,7 +694,9 @@ static HRESULT WINAPI RegistrationInfo_get_URI(IRegistrationInfo *iface, BSTR *u
if
(
!
uri
)
return
E_POINTER
;
*
uri
=
SysAllocString
(
reginfo
->
uri
);
if
(
!
reginfo
->
uri
)
*
uri
=
NULL
;
else
if
(
!
(
*
uri
=
SysAllocString
(
reginfo
->
uri
)))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
@@ -722,7 +734,9 @@ static HRESULT WINAPI RegistrationInfo_get_Source(IRegistrationInfo *iface, BSTR
if
(
!
source
)
return
E_POINTER
;
*
source
=
SysAllocString
(
reginfo
->
source
);
if
(
!
reginfo
->
source
)
*
source
=
NULL
;
else
if
(
!
(
*
source
=
SysAllocString
(
reginfo
->
source
)))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
@@ -921,8 +935,8 @@ static HRESULT WINAPI TaskSettings_get_RestartInterval(ITaskSettings *iface, BST
return
S_OK
;
}
*
interval
=
SysAllocString
(
taskset
->
restart_interval
)
;
if
(
!*
interval
)
return
E_OUTOFMEMORY
;
if
(
!
taskset
->
restart_interval
)
*
interval
=
NULL
;
else
if
(
!
(
*
interval
=
SysAllocString
(
taskset
->
restart_interval
))
)
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
@@ -1135,8 +1149,8 @@ static HRESULT WINAPI TaskSettings_get_ExecutionTimeLimit(ITaskSettings *iface,
return
S_OK
;
}
*
limit
=
SysAllocString
(
taskset
->
execution_time_limit
)
;
if
(
!*
limit
)
return
E_OUTOFMEMORY
;
if
(
!
taskset
->
execution_time_limit
)
*
limit
=
NULL
;
else
if
(
!
(
*
limit
=
SysAllocString
(
taskset
->
execution_time_limit
))
)
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
@@ -1187,14 +1201,8 @@ static HRESULT WINAPI TaskSettings_get_DeleteExpiredTaskAfter(ITaskSettings *ifa
if
(
!
delay
)
return
E_POINTER
;
if
(
!
taskset
->
delete_expired_task_after
)
{
*
delay
=
NULL
;
return
S_OK
;
}
*
delay
=
SysAllocString
(
taskset
->
delete_expired_task_after
);
if
(
!*
delay
)
return
E_OUTOFMEMORY
;
if
(
!
taskset
->
delete_expired_task_after
)
*
delay
=
NULL
;
else
if
(
!
(
*
delay
=
SysAllocString
(
taskset
->
delete_expired_task_after
)))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
@@ -1746,13 +1754,9 @@ static HRESULT WINAPI ExecAction_get_Path(IExecAction *iface, BSTR *path)
if
(
!
path
)
return
E_POINTER
;
if
(
!
action
->
path
)
{
*
path
=
NULL
;
return
S_OK
;
}
if
(
!
action
->
path
)
*
path
=
NULL
;
else
if
(
!
(
*
path
=
SysAllocString
(
action
->
path
)))
return
E_OUTOFMEMORY
;
if
(
!
(
*
path
=
SysAllocString
(
action
->
path
)))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
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