Hans Leidekker : taskschd: Use heap_strdupW to allocate the interval in TaskSettings_put_RestartInterval.

Alexandre Julliard julliard at winehq.org
Tue Nov 28 15:11:05 CST 2017


Module: wine
Branch: master
Commit: eb87ede3fed95129606951b5370a619bb2500585
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=eb87ede3fed95129606951b5370a619bb2500585

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Tue Nov 28 15:21:54 2017 +0100

taskschd: Use heap_strdupW to allocate the interval in TaskSettings_put_RestartInterval.

Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/taskschd/task.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/taskschd/task.c b/dlls/taskschd/task.c
index e417c05..70340be 100644
--- a/dlls/taskschd/task.c
+++ b/dlls/taskschd/task.c
@@ -925,12 +925,12 @@ static HRESULT WINAPI TaskSettings_get_RestartInterval(ITaskSettings *iface, BST
 static HRESULT WINAPI TaskSettings_put_RestartInterval(ITaskSettings *iface, BSTR interval)
 {
     TaskSettings *taskset = impl_from_ITaskSettings(iface);
-    BSTR str = NULL;
+    WCHAR *str = NULL;
 
     TRACE("%p,%s\n", iface, debugstr_w(interval));
 
-    if (interval && !(str = SysAllocString(interval))) return E_OUTOFMEMORY;
-    SysFreeString(taskset->restart_interval);
+    if (interval && !(str = heap_strdupW(interval))) return E_OUTOFMEMORY;
+    heap_free(taskset->restart_interval);
     taskset->restart_interval = str;
 
     return S_OK;




More information about the wine-cvs mailing list